Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why closing all Forms on App Exit?
Message
From
09/04/2022 08:03:21
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01684122
Message ID:
01684130
Views:
36
>Thank you for your input. As I wrote in my message to Dragan, the code above will work in majority of the cases. But since I will include it in a TRY/CATCH, there could be a time when the code will not run. And in this case, the application will try to close with some forms being open.
>I will test a case with a messagebox() window being open and at the same time trying to close the application.

Messagebox is nearly not solvable. As long as you don't use a custom one, you might issue KEYBOARD '{ESC}' or the like to close a messagbox. Reportpreview there is control, if you use BEHAVIOUR 90. Else there is only KEYBOARD, and the form calling the report needs to know.

I do something like setting a flag to my form telling the form that a child window is open, an then it runs through its form manager trying to close the child form first and deny it's own shut down. Job of QUERYUNLOAD. This needs a timer on application level so it try to shutdown several time. (One must first end all code where, for example, a modal window is involved, then the form.) Complex crap I lost a month till it was working.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform