kpnkpn
asked on
Stop child flickering (MDI)
I have an MDI-application with 3 loaded childs (maximized). When I want to show one of the other two childs it first appear as none-miximized then it maximizes and I get a very irritating delay in my program. How do I get rid of this flickering?
When I'm going to show an MDI child I use frmMdiChild1.zorder. Can I do it in an other way?
When I'm going to show an MDI child I use frmMdiChild1.zorder. Can I do it in an other way?
ASKER
I have allready checked all the things you said. But I can't get rid of the window animation (from normal state to maximized). I have a listview at the left with three items. When I click on the first item i write: frmChild1.zorder. And then I get this irritating window animation.
Why not this:
Maximise it when it's hidden then show it - he mdichild?
Maximise it when it's hidden then show it - he mdichild?
Why not this:
Maximise it when it's hidden then show it - he mdichild?
Maximise it when it's hidden then show it - he mdichild?
Set AutoShowChildren of your MDI form to False. Then you will be able to Load form without showing it:
Load frmChild
frmChild.WindowState = vbMaximized
frmChild.Show
Please, do not accept this comment as answer if it is not for A grade.
Load frmChild
frmChild.WindowState = vbMaximized
frmChild.Show
Please, do not accept this comment as answer if it is not for A grade.
Hi!
How about this (assuming the mdichild is called Child)...
'Add this code to the MDIchild form:
Private Sub Form_Load()
Child.Move 0, 0, MDIForm1.Width, MDIForm1.Height
End Sub
'Add this code to your MDIForm:
Private Sub MDIForm_Load() 'You can change it - not necessarily MDIForm_Load
Load Child
Child.WindowState = vbMaximized
End Sub
That's it!
glass cookie : )
How about this (assuming the mdichild is called Child)...
'Add this code to the MDIchild form:
Private Sub Form_Load()
Child.Move 0, 0, MDIForm1.Width, MDIForm1.Height
End Sub
'Add this code to your MDIForm:
Private Sub MDIForm_Load() 'You can change it - not necessarily MDIForm_Load
Load Child
Child.WindowState = vbMaximized
End Sub
That's it!
glass cookie : )
That's the best I could do to remove as much maximising animation as possible.
ASKER
Thankyou very much for the answers. I apologies for being indistinct. The problem isn't when I'm about to load the childs. It's when I have loaded 3 childs and want the 2nd to be shown. I then use zorder() and thats when I get the window animation.
> I then use zorder() and thats when I get the window animation.
Well, don't use frm.Zorder, use frm.Show
Well, don't use frm.Zorder, use frm.Show
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks... I didn't think about that.
' Call to Child
Load cfrmChild
cfrmChild.Show
cfrmChild_Load Event:
' I have seen this show a form though
cfrmChild1.WindowState = vbMaximized
Hope it helps