How to Catch WebUI Window Close Event from System Menu 'Close' Button?
Posted: Wed Nov 27, 2024 9:17 am
Hi @salvador, great project again 
On a Delphi or Lazarus project and I'm trying to catch the web_exit event when the user closes the WebUI window via the system menu (close button in the window's title bar).
Catching web_exit through a button in the JS interface works perfectly, but when the close button in the system menu is used, the event isn't triggered. I mean, If we take the sample `call_js_from_delphi`, clickng on the "Exit" html button the main form close, but closing it from system menu, the main form won't close;
How I can detect this system menu "Close" action from main Form and handle the event properly without messing process tricks?
Any advice or code snippets would be greatly appreciated
On a Delphi or Lazarus project and I'm trying to catch the web_exit event when the user closes the WebUI window via the system menu (close button in the window's title bar).
Catching web_exit through a button in the JS interface works perfectly, but when the close button in the system menu is used, the event isn't triggered. I mean, If we take the sample `call_js_from_delphi`, clickng on the "Exit" html button the main form close, but closing it from system menu, the main form won't close;
How I can detect this system menu "Close" action from main Form and handle the event properly without messing process tricks?
Any advice or code snippets would be greatly appreciated
