From: Dale Dedoroy
Bacolod City, Negros Occidental
To: Shaun Longworth
Visual FoxPro 6
General VFP Topics
Saturday, April 26, 2003 7:39:26 AM
This message was rated by:
> Within our program we have ON ERROR code. When we encounter certain errors we would like to have our program exit gracefully. Whenever this error is encountered we are issuing a QUIT statement. We have ON SHUTDOWN code which closes the environment and the tables and clears events, etc. but after this is executed the code within the UNLOAD event of the Form is being processed which is causing errors.
> Is there anyway to bypass the unload code so that it just simply quits??
> Any help would be greatly appreciated.
> Thank you in advance.
> Shaun Longworth
Create a public var, say , _glQuitApp in your main program and set this as .F. in your shutdown procedure, set this var to .T. somewhere when the user decided to quit your app. In your form's unload method you may add the lines:
*** your code here
Therefore, your code within the IF/ENDIF statement will only fire if you normally close the form. It won't fire if you quit the entire app. You may create a form class so that you don't have to go over all of your form's and put the proper modification code. Goodluck.
"Man's mind once stretched by a new idea never regains its original dimension."