Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent Closure of Modeless during Process
Message
 
To
03/04/2008 16:24:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01308031
Message ID:
01308033
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
You can use a form property as a flag, you set it up to .t. when the process starts and reset it to .f. when the process ends, now you only allow the form to close when the flag is .f., for doing so you can check in the queryunload of the form as well as in the button that you use for exit, if you have one. The code for the query unload would be something like:
if thisform.ProcessIsRunning
   nodefault
endif
>I have a modeless form. When the user selects an 'Execute' button on the form how to prevent the user from then closing the modeless form while the method is executing? The 'Execute' commandbutton does not close the form at completion. But I do not want the user to try to close the form either in the middle of the process as it may be long running (I am displaying a status indicator). Thanks.

[Update]Doh, silly answer. sorry
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform