idftp1.get and progressbar

Giganews Newsgroups
Subject: idftp1.get and progressbar
Posted by:  Stein Ivar Johnsen (si…@start.no)
Date: Mon, 25 Aug 2008

Hi..

I need help to implement a progressbar with the use of idftp1.get  -  Here
is the code:

procedure TForm1.Button1Click(Sender: TObject);
begin
if IdFTP1.Connected then
    begin
      IdFTP1.Disconnect;
    end
  else
    begin
    IdFTP1.Host := 'xxxxxx'; // e.g. 'ftp.redhat.com'
    IdFTP1.Username := 'xxxxxxxxx'; // e.g. 'anonymous'
    IdFTP1.Password := 'xxxxxxxxx'; // e.g. youremailaddress
    IdFTP1.Port := 21;
IdFTP1.Connect;
    IdFTP1.TransferType := ftBinary;
    idFTP1.ChangeDir('/xxxxx');
    IdFTP1.Get( 'myprogram.exe', 'myprogram.exe', true );
    IdFTP1.Disconnect;
  End;
end;

Could someone please help me, and examples would be great.
Thanks!

--
Regards
sijo
http://www.dyg.no

Replies