Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to close all forms?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00284684
Message ID:
00284754
Vues:
18
Hi Roi,
>
>The _screen.forms is a collection and is LIFO (last in / first out). What's happening is the foreach moves down through the collection closing forms as it goes, but each time a form is closed, all the remaining forms move up in the collection. Also, the forms collection will contain any toolbars so you need to trap for them.

Not exactly. The order of a LIFO stack is static only responding to PUSHes and POPs. A good example of a LIFO stack in VFP are menus. The forms collection isn't really a LIFO stack, because the order of it is changed each time a window is activated. The most recently activated form is brought to the top (this excludes toolbars, if present, which will always preceed the forms.

You're correct about closing them. One should start at the last form in the collection and work upward.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform