0

I am creating an MDI application in which it has multiple mdiChild forms. When I resize one mdiChild form, it affects the other mdiChild forms.. How can I solve this? There are a lot of questions about mdichild forms here but none of them seems to be the same case as i have.

Example :

When i maximize one mdiChild form, the other will maximize too even though they are set to normal window state already..

EDIT

This is the mdiParent codes where i call the mdiChild forms.

private void editAccountToolStripMenuItem_Click(object sender, EventArgs e)
{
    AdminForms.Dialogs.FrmAdminEdit adminedit = new AdminForms.Dialogs.FrmAdminEdit();
    adminedit.Show();
    adminedit.MdiParent = this;
}

private void listOfCandidatesToolStripMenuItem_Click(object sender, EventArgs e)
{
    AdminForms.Dialogs.FrmCandidate cand = new AdminForms.Dialogs.FrmCandidate();
    cand.Show();
    cand.MdiParent = this;
}

But in run-time, when i resize one of the mdichild, the other mdichild forms are resizing too.. if maximize button is clicked, all of the mdichild will be maximized.

I want the mdiChild that I resize, do not affect the other mdiChild forms..

  • Can you please post the relevant part of your code? – o_weisman Mar 04 '15 at 06:23
  • @o_weisman, i edited my question.. can you help me with it please... – Lyndon Broz Tonelete Mar 04 '15 at 07:53
  • How are you resizing the form? Using the mouse or programmatically in code? – o_weisman Mar 04 '15 at 12:00
  • @o_weisman, using the mouse, in run-time. If the two mdiChild are open and are in normal windowstate, when I maximize one of them, the two of them are maximized.. even if they are in normal state.. – Lyndon Broz Tonelete Mar 04 '15 at 12:30
  • Apparently this is by design. There are two suggested workarounds at the bottom of this link: https://social.msdn.microsoft.com/Forums/windows/en-US/9fa480ba-d0ce-4c70-8a22-dc740d710622/mdi-application-child-forms-maximizenormalminimize-independent?forum=winformsdesigner – o_weisman Mar 04 '15 at 13:26
  • That is just how MDI works. One thing I would change in your code though, is set the MdiParent property *before* calling the `Show()` method. – LarsTech Mar 04 '15 at 14:24

0 Answers0