>Hi Dennis,
>
>I did away with the X in the upper right corner by settting _screen.ControlBox = .F.
>The _screen, as far as I know, does not have a QueryUnload method. But I will double check.
>Thank you.
>
Hi Dmitry, instead of calling CLEAR EVENTS directly from the ON SHUTDOWN command, you could call a procedure like this:
ON SHUTDOWN DO OnShutdown
READ EVENTS
PROCEDURE OnShutdown
IF MESSAGEBOX('Dou you want to exit?', 4+ 32, 'Trying to exit') = 7
RETURN .F.
ENDIF
CLEAR EVENTS
ENDPROC