Sollte es nicht so gehen?
Ist jetzt nur sehr rudimentär dargestellt.
Grüße
Klaus
Delphi-Quellcode:
type
TAClient = Array [0..2] of TidTelnet;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
AClient : TAClient;
{ Private declarations }
public
{ Public declarations }
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i:Byte;
begin
for i:=0 to 2 do
begin
AClient[i]:= TidTelnet.Create(Form1);
AClient[i].Host:=edit1.Text;
AClient[i].Port:=StrToInt(edit2.Text);
AClient[i].Connect;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
i:Byte;
begin
for i:=0 to 2 do
begin
AClient[i].Disconnect;
AClient[i].Free;
end;
end;