Page 1 of 1

Force Close

Posted: Thu Feb 16, 2012 8:04 pm
by spacebuddy
Anyone know how to detect if your application has been closed when someone
uses "Activity Monitor" to kill the application.

Thanks

Re: Force Close

Posted: Thu Feb 16, 2012 8:20 pm
by Tenaja
A quick test showed this...

Case #PB_Event_CloseWindow
MessageRequester("Closing...", "this window: " + Str( GetActiveWindow()))

...to give you the message box if you close it using the control. In windows, however, the program was just halted, and none of the exit commands were executed. I guess that means you can "easily" detect if it is NOT forced closed.

Re: Force Close

Posted: Thu Feb 16, 2012 8:33 pm
by spacebuddy
Yes, if you use the control then it closes, but I am using Activity Monitor to force close the
app which does not work on my system (OS/X Lion).