Just an "academic" observation. Sleep() and ProcessMessages are two very different things. A call to Sleep() has nothing to do with processing messages and, calling Sleep in a UI thread is, more often than not, a bad idea because it delays the repainting of the window.
I agree with you. Sleep will block the UI thread for sure.
Hi
Have a look at Postmessage / Sendmessage...
From thread to main...
Regards Benny
Thanks for your suggestion, but I really don't want a too complicated solution.
Synchronize should've worked.
_____________________________________
Anyway, I was able to reproduce the problem in a test application.
It seems the Synchronize failed only in the child form.
In the main form, it works well.
You can try it in a crude app I made. Pls ignore code quality
Ps. I *THINK* my code is right. But if you find bug do let me know. Otherwise I am baffled as to why the UI is not updating in Synchronized methods in child form only.