Re: Freeze application if call TThread.Synchronize() in OnLoadStart
Posted: Sat Jul 15, 2017 7:20 am
Hi,
This is what the CEF3 source code comments say about all those events :
The VCL doesn't like to create, modify or destroy components in different threads and you may get errors if you do that in these events.
Instead of using TThread.Synchronize, send a customized message to the main form. When the main form receives it you can create, modify or destroy other components or child forms safely.
This is what the CEF3 source code comments say about all those events :
Code: Select all
// Implement this structure to handle events related to browser load status. The
// functions of this structure will be called on the browser process UI thread
// or render process main thread (TID_RENDERER).
Instead of using TThread.Synchronize, send a customized message to the main form. When the main form receives it you can create, modify or destroy other components or child forms safely.