Home All Groups Group Topic Archive Search About

Load an MDI child maximized...

Author
17 Jan 2006 1:38 PM
Martin
VB2005 / XP SP2

Hi all,
I'm just a newbie in VB.Net and I created an MDI container form, with a menu
and when I choose something from the menu, it should load the MDI child form
maximized.

To achieve this I set the WindowState property of the child to 'Maximized'
and use the following code to display the form:

frmPatient.MdiParent = Me
frmPatient.Show()

The window loads not maximized in the MDI container, but as soon as I resize
or move the MDI Container the Child form maximizes. Do I need to repaint or
something?

Tia,
Martin

Author
17 Jan 2006 1:41 PM
S Shulman
Try putting the code in the Load event of the Child form
hth,
Shmuel

Show quoteHide quote
"Martin" <x@y.com> wrote in message
news:u78gWt2GGHA.2300@TK2MSFTNGP15.phx.gbl...
> VB2005 / XP SP2
>
> Hi all,
> I'm just a newbie in VB.Net and I created an MDI container form, with a
> menu and when I choose something from the menu, it should load the MDI
> child form maximized.
>
> To achieve this I set the WindowState property of the child to 'Maximized'
> and use the following code to display the form:
>
> frmPatient.MdiParent = Me
> frmPatient.Show()
>
> The window loads not maximized in the MDI container, but as soon as I
> resize or move the MDI Container the Child form maximizes. Do I need to
> repaint or something?
>
> Tia,
> Martin
>
>
>
>
>