Operations in separate TThread block GUI thread Operations in separate TThread block GUI thread multithreading multithreading

Operations in separate TThread block GUI thread


I now have the solution for you!

Calling TDownLoadURL.Execute (your call to dl.Execute in TDownloadThread) results in the action being transferred back into the main thread which is why your UI becomes unresponsive.

Instead you should call ExecuteTarget(nil) which performs no such machinations and works as you intend: the download runs on the worker thread.