|
-
Nov 15th, 2000, 06:51 AM
#1
Hoi folks, i have some typical newby questions
After declaring Forms2.visible=false,
i noticed that forms1.activate runs.
( forms2 is set visible from within forms1,
forms2.visible=false is declared in forms2 )
Is that normal ?
How can i prevent that ?
Why do i see 2 entry's in the taskbar ?
Do i really have to read my tutorial from the start
instead of reading backwards ? :<)
-
Nov 15th, 2000, 07:04 AM
#2
_______
<?>
Form1 code..
Form1.Visible = False
Form2.Visible = True
Form2 code..
Form2.Visible = False
Form1.Visible = True
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 15th, 2000, 07:07 AM
#3
Addicted Member
Form1 is the active form. Then you show Form2 and Form2 becomes the active form. This means that the Deactivate event for Form1 should happen, and the Activate event for Form2 should happen. Now when you make Form2 invisible, Windows has to pick another form to make the active form. Why not the one that was active last? So windows will make Form1 the active form again, and that is where the Activate event happens.
The only way you can stop it is to make sure that windows selects a different form to be the active form when Form2 is hidden. You can do this by making Form1 invisible or minimized before Form2 becomes invisible.
Hope this helps.
Shrog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|