prevent close event

Post Reply
dseh
Posts: 1
Joined: Thu Sep 23, 2021 8:22 am

prevent close event

Post 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?
User avatar
salvadordf
Posts: 3070
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: prevent close event

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