⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 joingame.pas

📁 Delphi7.0平台开发
💻 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 + -