Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange ActiveForm behaviour
Message
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Strange ActiveForm behaviour
Miscellaneous
Thread ID:
00167658
Message ID:
00167658
Views:
71
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
Next
Reply
Map
View

Click here to load this message in the networking platform