CONTINUE

Quit Method

This method shuts down the VFP application server.

Usage

_VFP.Quit() Application.Quit() oVFPObject.Quit()
You can address Visual FoxPro as an Automation server. When you do so, the Quit method lets you close the server. It's the Automation equivalent to the Quit command.

As the syntax diagram shows, you can also use Quit with the _VFP and Application references to the currently executing VFP session. Of course, doing so abruptly ends that session.

Unlike the Quit methods of some other Automation servers, VFP's Quit method doesn't provide a way for you to indicate what should happen to unsaved changes. So, issuing the Quit method when files are open for editing (in the development environment) generates a series of "Do you want to save changes " dialogs.

Calling this method fires any ON SHUTDOWN routine. If you're trying to do something totally behind the scenes, make sure that the ON SHUTDOWN routine doesn't call for user interaction.

Quit isn't available to your custom Automation servers because you normally would not want to expose the Application object. Create your own custom Quit routine if you need one as part of your server.

Example

oVFP = CreateObject("VisualFoxPro.Application") oVFP.Quit()

See Also

Application, On Shutdown, QueryUnload, Quit, _VFP


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net