Unit1.pas
上传用户:cnjnqp
上传日期:2022-05-02
资源大小:194k
文件大小:1k
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
- IdTCPClient, IdTelnet;
- type
- TForm1 = class(TForm)
- IdTelnet1: TIdTelnet;
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- if( not IdTelnet1.Connected ) then
- begin
- IdTelnet1.Connect;
- end
- end;
- end.