Moises,
The "Cannot Quit" message is the VFP default ON SHUTDOWN implementation.
You can override the default processing by assigning ON SHUTDOWN to your own process, such as
ON SHUTDOWN FINISH()
Where FINISH.PRG contains your custom shutdown processes.
Another approach is suggested by developer Jim Hapenney (
jim@vvm.com) in the July, 2001 Visual Foxpro User Group Newsletter. He uses an API call to shut down Fox. Here is his FINISH.PRG.
CLOSE DATABASE
CLEAR DLLS
DECLARE ExitThread IN WIN32API
ExitThread()
ExitThread (which must, by the way, be entered exactly as shown or it will not work), immediately exits out of your EXE regardless of the state of your environment by killing the thread on which Fox is executing.
However, Pablo Pioli (
ppioli@hotmail.com) indicates that ExitThread() may cause problems if the Microsoft Agent control is running when ExitThread() is issued. See his notes also in the July Newsletter.
The Virtual FoxPro User Group may be found at
www.vfug.org.
Regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.