2
votes

How can I make my mdi child form always in maximize state. For example, I have a parent form and 2 children. when i open my 1st child forms it open in maximize state...when i open my 2nd child form while the 1st child form is open it opens in maximize state too (it will overlap the other)..my problem is when the 2 child forms are open at the same time and when i close one of them, the other form who left open turn into its normal...how can i maintain it in maximize state?

2
Have you tried frmName.WindowState = FormWindowState.Maximized ? - Edper
yes ive tried it...when i open my 1st child forms it open in maximize state...when i open my 2nd child form while the 1st child form is open it opens in maximize state too (it will overlap the other)..my problem is when the 2 child forms are open at the same time and when i close one of them, the other form who left open turn into its normal...how can i maintain it in maximize?.. - Mark
This is by design. There can only be one child that's maximized. You'll need to deal with this restriction. With very high odds that if you want to always have the child maximized that MDI is simply not what you want. Which is common, MDI is a windowing model that dates from the early 1990s, back when users had low resolution monitors. - Hans Passant

2 Answers

1
votes

If I understand this question correctly, if you want to make sure a from is maximized when you close a different form, you could use the FormClosed event like:

Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.FormClosed
        Form2.WindowState = FormWindowState.Maximized
End Sub

HTH

0
votes

In Form Properties set MaximizeBox property as True.