Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sometimes I want to release form other I don't
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00498494
Message ID:
00498495
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform