Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot quit visual foxpro
Message
From
03/07/2001 10:03:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00526105
Message ID:
00526257
Views:
19
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.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform