?? joingame.pas
字號:
unit JoinGame;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm_JoinGame = class(TForm)
Label1: TLabel;
edtRemoteHost: TEdit;
btnOK: TButton;
btnCancel: TButton;
procedure btnOKClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_JoinGame: TForm_JoinGame;
Modal:Integer;
implementation
{$R *.dfm}
procedure TForm_JoinGame.btnOKClick(Sender: TObject);
begin
if edtRemoteHost.Text = '' then
begin
Application.MessageBox('遠程計算機名不能為空','警告',MB_ICONEXCLAMATION+MB_OK);
edtRemoteHost.SetFocus;
Exit;
end
else
begin
Modal := mrOK;
Close;
end;
end;
procedure TForm_JoinGame.btnCancelClick(Sender: TObject);
begin
Modal :=mrCancel;
Close;
end;
procedure TForm_JoinGame.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
ModalResult := Modal;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -