Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
QueryUnload and Release Thisform
Message
De
17/12/1999 16:29:57
 
 
À
16/12/1999 20:59:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00305043
Message ID:
00305483
Vues:
22
>I could try that. But it would seemed like handling the two exits differently. With the CloseEvent() I must check first if the user really wants to quit. If he wants, then will I issue the Release command. While, with the QueryUnload, if the user intends to stay on the session, I'll issue a NODEFAULT to prevent the Unload event to execute. This would make a common routine (like a 'DoBeforeClose()') to check first what called the method.
>
>I can not include this in my CloseEvent()
> Thisform.QueryUnload(),
>since it contains a NODEFAULT statement.
>
>Maybe you could help me with a non-messy routine.

Actually, you may have one common procedure, that will be called from QueryUnload and from all places you call RELEASE Thisform programmatically. The procedure (method) itself could be simple enough:
***Form.DoYouWantToClose
IF Messagebox('Do You Want To Close?',4+32)<>6
Return .f.
ELSE
Return .T.
ENDIF

***Form.QueryUnload
IF This.DoYouWantToClose()=.F.
NODEFAULT
ENDIF

etc.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform