0

I have MDI form and few child forms. When I maximize one of the forms all others are also maximized. For example from child form i want to activate another child form. Previously first child form is maximized. New opened form is also maximized even is set to be normal size. How to stop that? Is it some kind of bug?

Josef
  • 2,648
  • 5
  • 37
  • 73

1 Answers1

0

This is standard documented behavior.

There can be a possible workaround. When the maximized form is closed, you can tie to the FormClosing event and set the child form's WindowState to "FormWindowState.Normal"

private void Form_FormClosing(object sender, FormClosingEventArgs e)
{
 this.WindowState = FormWindowState.Normal;
}

Try this and see if it works for you.

Andy
  • 2,393
  • 4
  • 18
  • 20
  • It's not what i need... Let me try to explain what i have and what i want: I have MDI container. Inside container there is child form with datagrdview and this form is maximized. From that child form i have to open another small window that consist some other controls. It's pretty confusing and messy if this windows is also maximized and only contains one small listbox and button. If i open this second child with .ShowDialog() that it shows normal, but than it cannot be inside MDI container and all other windows are locked until this child is closed. – Josef Dec 31 '13 at 07:44
  • 1
    I think in that case you can choose to make the child form independent of the MDI container (i.e. it should no longer be child form). You can design it in such a way that it opens such that the MDI container is still visible (i.e. manipulate height, width of this form) and its dimensions are fixed. Just a rough workaround, and I know not ideal, but in the given circumstance it seems to be the way to go. – Andy Dec 31 '13 at 08:22