Detect window closing

Just starting out? Need help? Post your questions and find answers here.
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Detect window closing

Post by Blade »

Hello, I wish to execute a procedure when the program quits.
I can detect the "close gadget" event, but if the user press "alt-F4", what can I do?
In other basics I could intercept the "close application" (sort of) event...
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

On ALT+F4, you get an #PB_EventCloseWindow Event out of
WitWindowEvent() or WindowEvent().

Just the same, as if somebody clicks on the 'X' of the window.

Timo
quidquid Latine dictum sit altum videtur
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Thanks, I simply wrote wrongly the event detection... :)
Post Reply