Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Freeze application if call TThread.Synchronize() in OnLoadStart

Post Reply
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Freeze application if call TThread.Synchronize() in OnLoadStart

Post by salvadordf »

Hi,

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).
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.
Post Reply