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.