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.

prevent close event

Post Reply
dseh
Posts: 10
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: 4016
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