I am having this weird problem in Visual Basic (2013). I have a form in MDI container. Both of them, have property WindowState
to Maximized
. While executing, MDI container loads in maximized state (So far Ok!). But, when I open the child form, it Does NOT give the Actual Maximized state appearance (although Restore button on top right shows that it has loaded in maximized state, but it did not maximized).
I even tried with form1.WindowState = FormWindowState.Maximized
both before and after form1.Show()
, but no luck.
I have attached a screenshot too. Note the dead space of MDI container and Restore icon of child form (which means child form is in maximized state).
Few observations -
When I restore and then again maximize it, it DOES maximize correctly.
I also observed that this problem is occurs only for one time. I mean, if I have 2 forms both set to load in Maximized state. When I open the first form (no matter which), it loads like i showed in the screenshot, and after that when I open 2nd form, it loads in maximized state.
I could not figure out, what went wrong? How to correct this?