QueryUnload
We ask and ask: Thou smilest and art still,
Out-topping knowledge.
Matthew Arnold, Shakespeare, 1849
This method is called when the user closes a form with the Close box or when code causes a form to close. It's the place to double-check that the user really wants to close the form and to give her a chance to save her work before closing.| Usage | PROCEDURE oForm.QueryUnload |
| Example | * Here's a typical QueryUnload method: LOCAL nchoice, lReturn * Assumes the form has #INCLUDEd "FoxPro.H" nchoice = MESSAGEBOX("Save changes", ; MB_YESNOCANCEL + MB_ICONQUESTION + MB_DEFBUTTON1) lReturn=.t. DO CASE CASE nchoice = IDYES WAIT WINDOW "Saving changes" CASE nchoice = IDNO WAIT WINDOW "Exit without saving" CASE nchoice = IDCANCEL NODEFAULT lReturn=.f. ENDCASE RETURN lReturn |
| See Also | Destroy, NoDefault, On ShutDown, Release Method, ReleaseType |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.