May 10, 2024, 06:16:30 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Action before @IDCLOSEWINDOW

Started by Jerry Muelver, February 27, 2008, 05:04:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jerry Muelver

I have a "clean up dirty file" routine I use when the user chooses "Quit" from the menu. I want to plug that same routine into action when the user clicks on the "X" in the corner of the window to quit, instead of using the menu.

case @IDCLOSEWINDOW
IF dirtyfile = 1 then GOSUB doDirtyFile
run = 0


Doesn't work. I'm guessing that's because the window is already closed by the time the @IDCLOSEWINDOW message hits the loop. Any suggestions to fix, or workaround?

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Jerry Muelver

Thanks, Larry. I can put this puppy to bed, now!

Ionic Wind Support Team

Should work fine, of course.  The X in the title bar sends the @IDCLOSEWINDOW message, so the window is never closed unless you are actually calling the CloseWindow command.

Ionic Wind Support Team