unitlogin.pas
来自「如何在Delphi下实现画面捕捉、传输、以及文件的传输原理」· PAS 代码 · 共 50 行
PAS
50 行
unit UnitLogin;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TFmLogin = class(TForm)
Label1: TLabel;
Label2: TLabel;
EdtQQ: TEdit;
EdtKey: TEdit;
BtnLogin: TButton;
BtnCancel: TButton;
Image1: TImage;
procedure BtnLoginClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FmLogin: TFmLogin;
implementation
uses UnitThread;
{$R *.dfm}
procedure TFmLogin.BtnLoginClick(Sender: TObject);
var
LoginCB : TCommBlock;
begin
LoginCB.StrKind := 'LOGIN';
LoginCB.SendName := EdtQQ.Text;//local qq to indentify the host
LoginCB.ToName := '';
LoginCB.Msg := EdtKey.Text;
try
FmThread.IdTCPClient.WriteBuffer(LoginCB,Sizeof(LoginCB),True);
except
on e : exception do MessageDlg('Conntion error' + #13, mtError, [mbOk], 0);
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?