Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sometimes I want to release form other I don't
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00498494
Message ID:
00498495
Vues:
9
>Hi,
>
>I have a form, with the "X" in upper right corner. When cliccing on that forms released - thats fine
>
>Some times a special condition is there, and then I want a special warning to be displayed - and then prevent releasing.
>
>If I put the messagebox() in the destroy method - it displays - but I can't figure out HOW to prevent the form from closing
>
>I know I can disable the "X" perhaps via a timer - but that does not give the message to help the user.
>
>There is no valid for that condition.
>
>In short is it possible to prevent a release of a form - like returning an F in the INIT - or Valid
>
>Thanks in advance
>
>Lasse
>
>PS: a DO Form in the destroy does actually the job - but I doubt that's a good solution


Look in the queryunload event of the form.
There you can place your messagebox code.
If you want to stop the releasing of the form then after the messageboxe is shown, you can issue nodefault which stops the form from unloading
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform