Multiple Files download and progress update

Giganews Newsgroups
Subject: Multiple Files download and progress update
Posted by:  Clément_Doss
Date: Mon, 02 Oct 2006


I am still doing my FTpClient improvments. As I have written the FTP thread, I would
like to show some progress (progress bar).
What would be the correct to implement this?
1) Create the form on the Thread.Execute method and hook the OnWork, OnWorkBegin and
OnWorkEnd to the progress bar of that form? In that case, do I need to call
synchronize, I mean, the thread /has/ its own form, so there should be 2 threads
accessing the same form at any time?
2) A form that will create the thread and hook itself to the thread. I guess this
would be a better approach, but that just a guess. And once again, do I need to call
synchronize for the progress bar update?


Obs: I am using Indy10 (10.1.5) and Delphi 7