Article View: borland.public.cppbuilder.internet.socket
Article #2547Re: Progress bar for FTP
From: Remy Lebeau (TeamB)
Date: Fri, 24 Mar 2006 19:49
Date: Fri, 24 Mar 2006 19:49
26 lines
2037 bytes
2037 bytes
"David Ayre" <davidcayre@ntlworld.com> wrote in message news:44241e78$1@newsgroups.borland.com... > I'm using the Indy 9 IdFTP component and it is now working > very nicely. However, it would be nice to have a progress bar > to show the progress of the upload or download. That is what the OnWork... events are for. The OnWorkBegin event tells you when a transfer is beginning, and how much data is going to be transferred. The OnWork event tells you the progress of the transfer. The OnWorkEnd event tells you when the transfer finishes. Keep in mind, however, that the FTP protocol does not send the file size during a transfer. So when you use the Get() method to download a file from the server, the OnWorkBegin event will not be able to tell you the size of the file that is being transferred. You will have to determine the file's size before calling Get(), such as with a directory listing or with the Size() method. Uploading files, on the other hand, will always report the correct file size in the OnWorkBegin event, since it uses the size of the stream that is used for the transfer. Gambit
Technical Details
Message-ID:
<44244d53$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44241e78$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3c25158ce52e9813 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <44241e78$1@newsgroups.borland.com> Subject: Re: Progress bar for FTP Date: Fri, 24 Mar 2006 11:49:32 -0800 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <44244d53$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1143229779 68.69.17.41 (24 Mar 2006 11:49:39 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail