05-19-2023, 04:25 PM
(05-19-2023, 03:11 AM)zsleo Wrote: TidAntiFreeze is in the ServerController.
I'm not familiar with IntraWeb or how it works. What thread does the ServerController run in? TIdAntiFreeze does nothing if invoked in a worker thread.
(05-19-2023, 03:11 AM)zsleo Wrote: In my Main Form I have an TIWTimer and Button with its OnClick calls the following procedure
Why are you running a TTask that effectively does nothing? All it does is Sleep() until gv_ToStop is True. That is a useless waste of a worker thread.
(05-19-2023, 03:11 AM)zsleo Wrote: TIWTimer.Interval is set to 200 and the async event as follows
You are calling GetFile() (and thus running TIdFTP) in the context of the thread that fires the timer event, so you are blocking your timer while the FTP transfer is in progress, which is why the timer is not able to update your ProgressBar.
I strongly suggest that you move your FTP transfer logic to a separate worker thread. Do not block your timer handler.