WindowState=FormWindowState.Normal

PROKA

Junior Contributor
Joined
Sep 3, 2003
Messages
249
Location
Bucharest
I have a child window (frmOne), maximized in its parent window.

I have a link to open another window (frmTwo)
this frmTwo is fixed size, looks awful maximized.

When I open it, it opens it as being Maximized.

This
Visual Basic:
frmTwo.WindowState=FormWindowState.Normal
doesn't work
 
I've noticed this, too. Even when the MaximizeBox is set to false the form will show maximized in MDI. Our solution was to use the Activated event of those forms that you don't want maximized and put in the following code:
VB: Me.WindowState = FormWindowState.Normal
C#: this.WindowState = FormWindowState.Normal;

If you do it often, you can create a base form that handles this. For overall design, it's nice to have a few "base" forms. We have ApplicationForm, SearchForm, and DialogForm at our company.

-ner
 
Ok Ner, it works like that but there's another issue: Like this, the frmOne gets .windowState = FormWindowState.Normal too, and It's bad also :(
 
Back
Top