Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange ActiveForm behaviour
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Strange ActiveForm behaviour
Divers
Thread ID:
00167658
Message ID:
00167658
Vues:
72
Hi to All ! Another puzzle to your sagacity...

We have a MDI app, we want to display forms, let's say, "custom controlled" with an apparently modal behaviour.

For example, Form1 is displayed modeless, BUT its Activate event (or another one) contains code we want to execute _before_ displaying Form2.
So we have a tip : we use an infinite Do...Loop like this :

Do while Screen.ActiveForm.Name = "Form1"
DoEvents
Loop 'Not very strong, but, he, he, it works

Then we unload (hide & set = nothing) Form1, and wish to execute the code following the "Show", in order to show Form2. The problem is that ActiveForm doesn't change, unless Form1 is unloaded...

Isn't it a kind of magic ?

Thanks if you could help us.
VB Developer
Servilog Concept
jmb@octalfrance.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform