Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

frmTwo.WindowState=FormWindowState.Normal 

doesn't work

Development & Research Department @ Elven Soft
  • *Experts*
Posted

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

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted
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 :(
Development & Research Department @ Elven Soft

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...