Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Progress Bar for an FTP Transfer

www.cryer.info
Managed Newsgroup Archive

Re: Progress Bar for an FTP Transfer

Subject:Re: Progress Bar for an FTP Transfer
Posted by:"Martin James" (mjames_falc..@dial.pipex.com)
Date:Mon, 8 May 2006 12:02:27

"Barry Wood" <Barry@AMSS.uk.com> wrote in message
news:445ef7a3$1@newsgroups.borland.com...
> Yes, Indy has those events. I'm not unclear how I go about getting the
info
> from them. I have a 'put' to transfer the file and I know the size: how do
I
> get the 'progress' points? Would I need a separate thread running to get
the
> updates from OnWork?
>

?? The OnWork event is called periodically by the TidFTP component.  It is
therefore called in the context of whatever thread called 'put'.  If this is
the main thread, update your progress bar in the event.  If the 'put' is
being performed in a secondary thread and the progress notification is
required in another thread, (usually main thread), use your favourite
inter-thread comms mechanism to signnal out the progress, (eg. synchronize,
PostMessage, TidNotify).

Rgds,
Martin

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive