When user accidentally closes the main form they are left with a blank screen they can't close. Get the message Can't quit Visual Foxpro. Is there a way to disable the X on the form window so that user can't click on x and close the form ?
Either set the CONTROLBOX to .f., make the CLOSEABLE property .f., or add code to the QUERYUNLOAD EVENT method to make a graceful exit (i.e. identical to the 'other' way to exit) when the X is clicked.
let's keep thing simple and add to config.fpw:
on shutdown do (program)
In my experience you cannot use this in a config file. Config files are used for setting up the environment ie: (TITLE = "My Application" or RESOURCE = OFF), you cannot call "on shutdown do..." in a config file.
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.