|
-
Feb 1st, 2002, 11:08 AM
#1
Thread Starter
Member
MDI program and child forms
Hi,
I have an MDI project and it allows the user to show any number of child forms. However, when about 3 children are showing, the child windows go through a crazy loop as if they are all fighting to be the top window. After about 10 seconds, the settle down but obviously it shouldn't happen. I'm calling the forms in the MDI form like:
Private Sub cmdResellerDetails_Click()
frmResellers.Show
End Sub
Private Sub cmdProfitSell_Click()
frmProfitSell.Show
End Sub
Where frmResellers and frmProfitSell are both child forms. Does anyone know why my windows are going crazy?
-
Feb 1st, 2002, 11:14 AM
#2
Frenzied Member
I guess the quetion is: what are the child forms doing when they load?
-
Feb 1st, 2002, 11:17 AM
#3
Thread Starter
Member
For example, I want form2 to show, but form1 is already visible. When form2 loads, form1 will grab the focus, then form2 then form1 then form2 repeat ad finitum (well for a while anyway )
-
Feb 1st, 2002, 11:24 AM
#4
Stuck in the 80s
I think he means code wise, what are the forms doing when they load? What is in their Form_Load?
-
Feb 1st, 2002, 11:30 AM
#5
Thread Starter
Member
Oh sorry, my bad 
One of the forms loads at the beginning of the program
One of the forms does a db query and then moves controls based on the width of the program
One of the forms moves controls based on the width of the program
Another thing is that in form_resize on all 3 forms, I have:
me.windowstate = 2
Could that be causing the probems?
Should I change it to:
if not (me.windowstate = 2) then
me.windowstate = 2
end if
-
Mar 13th, 2002, 07:26 PM
#6
New Member
I had a similar problem. In one form, I was referring to a control on a different child form. Just referring to the control on the other form caused the other form to be loaded and that started an endless loop.
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
|