Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
QueryUnLoad NODEFAULT
Message
 
À
22/09/1999 11:31:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00267604
Message ID:
00267746
Vues:
18
>I am calling a form from within another form,
>in the QueryUnload, on certain conditions I
>SetFocus to ComboBox in form
>NODEFAULT
>RETURN
>
>accourding to documantation:
>Issuing NODEFAULT in the QueryUnload event procedure prevents the form from unloading
>
>When exiting QueryUnload, form is released.
>I do not issue RELEASE
>
>HELP!!!
>
>Shlomo

You need both to issue NODEFAULT and to RETURN .F. if the form is not to be released. By doing this you can allow for a command button to test if a form is to be closed. Generally, the code would look something like:
* QueryUnload
llresult = < Logical condition indicating whether or not to close the form. >
IF llresult && In the case of .T. equalling don't close the form
  NODEFAULT
ENDIF
RETURN NOT llresult && Same as above
* Close command button click event
IF ThisForm.QueryUnload()
  ThisForm.Release
ENDIF
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform