Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if a form is open
Message
De
20/12/1999 10:38:26
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00305339
Message ID:
00306141
Vues:
24
>>Well, the generic MDI form does not have a forms collection, and I wasn't sure about the forms collection parsing all the forms in my app, not just the ones that are visible. The docs say the forms collection has every loaded form. What I want my app to do is if the user clicks on the toolbar or selects a menu item for a form that's already open but not on top, bring it to the front and make it the active form. I already have the window menu set for the window list also. At this time I think either way will do, but for apps that may have several or all of its forms loaded an array might be more efficient.
>
>Why not simply call frmChild.Show? If it is already loaded, then the loaded form will re-appear on top. If not loaded, it will be.
>
>So there is no need to check the forms collection in this case.

That was the first thing I tried, it doesn't work. I have VB6, an MDI form with several child ones open, and .Show doesn't bring the wanted form to the top. In fact, it doesn't do anything. I have the MDIchild property set to true in all forms that display within the MDI parent, except the ones I want to appear modal. Unless there's some other property I'm missing.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform