Window closed message?
Blitz3D Forums/Blitz3D Programming/Window closed message?
| ||
Is there any way to intercept the windows closed message in Blitz3d? I'm writing an app that remembers its position and size (stored in an ini file). It works as long as the user exits using Escape, or Alt F4, but if the user clicks on the windows close button I can't save the ini file... Is there a way to do this? -Pudding |
| ||
Maybe code archives. I need this ability too, coincidentially. I think Fredborg does it in Gile[s] |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=831 Here we are. It disables the x. I want to be able to intercept it though. Not sure how to make the decls either. |
| ||
Hi, Marcelo did a dll which can be used to grab the close event to a keyboard hit. So you can use KeyHit() to find out if the user clicked the close icon. It's toward the bottom of this thread: http://www.blitzbasic.com/Community/posts.php?topic=27586 |
| ||
Thanks Fredborg. Have you any idea why it insists on crashing when it exits? |
| ||
InstallCloseHandler(bla,bla) Repeat Until KeyHit(myexitkey) UninstallCloseHandler() ;<-- The cunning bit :) End |
| ||
How dastardly :) |
| ||
Awesome! Thanks! -Pudding |