Buat 1 Indy TCP, 1 button dan 1 slide
isikan code pada button anda copy paste dibawah
procedure TForm1.Button1Click(Sender: TObject);
begin
if Start then begin
Button1.Caption := 'OFF';
Start := False;
IdMappedPortTCP1.Active := false;
IdMappedPortTCP1.Bindings.Clear;
end else begin
Button1.Caption := 'ON';
Sleep(100);
Start := True;
IdMappedPortTCP1.Bindings.Add.IP := '127.0.0.1';
IdMappedPortTCP1.Bindings.Add.Port := PortIndyProject;
IdMappedPortTCP1.MappedHost := Host
Prov
;
IdMappedPortTCP1.MappedPort := PortProv;
IdMappedPortTCP1.Active := True;
end;
end;
Tambahkan pada Private
Start
: boolean;
setelah semua sudah, klik 1x slider > masuk ke event viewer pada delphi ubah OnSliderChange ke button1click . lalu build :D gampang kan ?? hehe
0 komentar:
Post a Comment