remove or intercept X button shutting down window?

Blitz3D Forums/Blitz3D Beginners Area/remove or intercept X button shutting down window?

tsmpaul(Posted 2009) [#1]
Hi guys. I wasn't sure what it is called, and did a few searches, but found no topics. When my program runs in window mode, I want some functions to run before it shuts down. If someone exits my program using the exit program option in the game, I can then make it do what I want, but if someone presses the X in the corner of the windows window frame, the program just shuts without running my exit code first.
Is there a way to remove the X in the window frame, or a way to intercept it and run some code before the program finishes shutting down?
Thanks for any help!


Matty(Posted 2009) [#2]
I didn't check too thoroughly, but maybe this would help:

http://blitzbasic.com/codearcs/codearcs.php?code=831


tsmpaul(Posted 2009) [#3]
Thanks - I'll check it out right now!