Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional closing form
Message
From
19/02/1999 08:09:51
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00189204
Message ID:
00189212
Views:
15
Thanks Josh, it work fine.

Maros Klempa

>Put this in your form's QueryUnload event:
>if messagebox('Do you really quit application?',36)#1
> nodefault
>endif
>Using QueryUnload has the added benifit that the user won't see the messagebox if you close the form programatically. Put your CLEAR EVENTS in the Destroy event. It will only execute if the user chooses to quit the application.


>>I create main SDI form of my app. I want avoid of user to immediately closing main form clicking on close button on upper-right corner of form. I add to destroy event of form next few lines.
>>
>>if messagebox('Do you really quit application?',36)=1
>> clear events
>>else
>> return .f.
>>endif
>>
>If user answer Yes, form close. It is o.k. If user answer No, form close too. How can I prevent closing form, if some condition is not meet.
>>
>>Maros Klempa
Previous
Reply
Map
View

Click here to load this message in the networking platform