Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why closing all Forms on App Exit?
Message
De
09/04/2022 08:03:21
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
08/04/2022 19:10:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01684122
Message ID:
01684130
Vues:
37
>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]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform