MDI Parent refresh issue when loading an MDI Child form

MDI Parent refresh issue when loading an MDI Child form

Post by SXRhc » Sat, 05 Feb 2005 05:05:03


I'm having a problem when opening an MDI Child form. I'm declaring the child
form then setting the dock property to fill so that it takes up the entire
space of the MDI Parent window without being maximized (user request). The
problem is that when the child form is being displayed it is briefly shown in
it's default size before being resized to fill the available area on the MDI
Parent form. How can I stop the MDI Parent from displaying the child form
until after all the load code is executed on the child form? I tried using
MDIParent.SuspendLayout() and MDIParent.ResumeLayout() but that didn't change
anything.

Here's the call to show the child form called from the MDI Parent
me.SuspendLayout() ' doesn't stop the flicker
dim frm as new Form2
frm.MdiParent = Me
frm.Dock = DockStyle.Fill
frm.Show()
me.ResumeLayout(True)

Thanks
 
 
 

MDI Parent refresh issue when loading an MDI Child form

Post by Cor Ligthe » Sat, 05 Feb 2005 17:38:44

Itar,

Are you really asking if we will help you because your user won't use normal
behaviour and maximize the mdi form.

What should we learn from that?

Cor

 
 
 

MDI Parent refresh issue when loading an MDI Child form

Post by SXRhc » Sat, 05 Feb 2005 23:41:01

That's it in a nutshell. What we learn from this is that users are finciky,
fickle creatures that cause no end to grief, but without whom I wouldn't have
a job.

Itar