Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close button & Release method
Message
 
À
11/04/2002 13:30:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00643849
Message ID:
00643851
Vues:
9
>It appears that when a form is closed using the Close button that the Release method doesn't get invoked. I know that I can disable the close button and force the user to close via a button I design or a menu choice. Is there a way to force the release event, or alternatively, simulate the Close button even though the form.closable property is set to false?

In the QueryUnload() event, add NODEFAULT to prevent the form from being closed. Generally, code like this, usually in a command button is used in conjunction with QueryUnload.
* In QueryUnload
LOCAL lloktoclose
lloktoclose = < Logical condition >
IF NOT lloktoclose
  NODEFAULT
ENDIF
RETURN lloktoclose

* Command button Clink

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