>>>>How do I completely shutdown an application with a top-level form?
>>>>I'm just closing the form, but the application stays running (per NT Task Manager).
>>>>I've tried moving the CLEAR EVENTS and the QUIT to different places with no luck.
>>>
>>>Have you tried an external prg ON SHUTDOWN? That's what I use...
>>
>>
>>I tried ON SHUTDOWN QUIT, but will look into calling an external program.
>
>Where have tried issuing QUIT? Have you verified that QUIT gets executed?
>
>'ON SHUTDOWN QUIT' is like saying 'when quitting, quit'
>ON SHUTDOWN specifies what happens when you issue QUIT.
It might be helpful, I take it from one prototype project:
PROCEDURE Footer && it fires on app start
**** many other settings
on shutdown do quitapp
return
procedure quitapp
oApp.quitflag=.t.
if type("frsMain.frmData")=="O"
frsMain.frmData.release()
endif
if type("frsMain.frmConfig")=="O"
frsMain.frmConfig.release()
endif
if type("frsMain.frmList")=="O"
frsMain.frmList.release()
endif
clear events
if wexist("frsmain")
release window frsmain
endif
return
endproc
Edward Pikman
Independent Consultant