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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

TChromiumWindow runtime

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

Re: TChromiumWindow runtime

Post by salvadordf »

Hi,

The CreateBrowser function is asynchronous and you have to wait until it's fully created to start loading URLs.
You have to implement the AfterCreate event in the internal TChromium to know when you can load a URL.

Most of the demos send a MINIBROWSER_CREATED message from the AfterCreate event to enable the interface and to load the initial webpage.

The AfterCreated event is called in the UI thread which is different than the main thread, and the VCL doesn't like to create/destroy components in different threads. That's why the demos send a MINIBROWSER_CREATED message to the main thread.
Post Reply