Page 1 of 1

prevent close event

Posted: Thu Sep 23, 2021 8:31 am
by dseh
Hi.
How can I prevent a WM_CLOSE from being sent when I close a browser instance that is embedded in the main form?

Re: prevent close event

Posted: Thu Sep 23, 2021 12:46 pm
by salvadordf
Hi,

Use the TChromium.OnClose event and set the aAction parameter to cbaDelay.

Copy the code from SimpleBrowser2 demo into your application and follow the "Destruction steps" described in the code comments.