?? main.pas
字號:
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPClient, StdCtrls,
IdIPWatch;
type
TForm1 = class(TForm)
IdUDPClient: TIdUDPClient;
btnSend: TButton;
edInfo: TEdit;
edServerHost: TEdit;
edServerPort: TEdit;
Label1: TLabel;
Label2: TLabel;
IdIPWatch: TIdIPWatch;
procedure btnSendClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btnSendClick(Sender: TObject);
begin
IdUDPClient.Send(edServerHost.Text, StrToInt(edServerPort.Text), edInfo.Text);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
edServerHost.Text := IdIPWatch.LocalIP;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -