>>>Hi everybody,
>>>
>>>I have these commands in the main program of the application:
>>>
>>>do mainmenu.mpr
>>>on shutdown do shutdownprogram
>>>
>>>read events
>>>
>>>I put assert command into shutdown program. However, it's not being called when I try to close the application in IDE by clicking on the x of the screen.
>>>What is it called then and why this program is not called?
>>>
>>>Thanks in advance.
>>
>>
>>Maybe somewhere you cleared on shutdown?
>>
>>How about:
>>
>>do mainmenu.mpr
>>on shutdown do shutdownprogram
>>....
>>read events
>>WAIT WINDOW "Current shutdown: "+ON("shutdown")
>>
>
>This code (wait window) is never executed.
>
>Here is exactly what I have
>
> DO SomeManager_menu.mpr
>
> ON SHUTDOWN DO mgr_click_shutdown
> DO FORM Some_Toolbar
> DO FORM BrowserForm NOREAD
> DO FORM Data_Path NOREAD
>
> USE IN SELECT('LOCKOUT')
> oAppObj.PollLockout_Start()
>
> READ EVENTS
> MESSAGEBOX("Current shutdown: "+ON("shutdown"))
>
>This messagebox is never displayed when I try to close the application with the close button.
Of course it is never displayed - you need a CLEAR EVENTS for the program to continue after the READ EVENTS
Gregory