Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating an MDI form Application in which one child form's window state is maximized while other child form state is user customized, the problem is that when I am opening the child form whose window state is maximized, all other child forms gets maximized automatically, that is what I don't want..

please help me to get ride of this problem..

thanks in advance..
Posted

Root cause for the problem is by design of MDI UI. This has been confirmed in the remark section of the link below: http://msdn2.microsoft.com/en-us/library/ms644917.aspx[^]

If an MDI client window receives any message that changes the activation
of its child windows while the currently active MDI child window is
maximized, the system restores the active child window and maximizes the
newly activated child window.
 
Share this answer
 
Comments
djrocks0101 11-May-12 1:30am    
Link is not working..
If you really do not like the behavior, a simple workaround is placing a
call to set the child form's WindowState to "FormWindowState.Normal"

C#
private void Form2_FormClosing(object sender, FormClosingEventArgs e)
{
this.WindowState = FormWindowState.Normal;
}
 
Share this answer
 
Comments
djrocks0101 11-May-12 1:19am    
The problem is still there..if I am opening the form with normal window state over a maximized window state form, the form with normal window state also getting maximized..please help..
you can set the form state as normal.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900