.net 2.0 MDI child maximize bug?

DimkaNewtown

Freshman
Joined
Jan 21, 2003
Messages
43
Location
New York City
I have a mdi parent window that opens some mdi child windows. When it opens the mdi children, these show up maximized in the parent.
Now this was converted from .net 1.1.

I added a new form, set all the properties the same as the other forms but when the mdi parent opens it, the mdi child form is the same size as it is in designer. The only way to actually get it maximized is to resize the mdi parent.

Anyone seen this before?
 
I found the culprit

[csharp]
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
[/csharp]

This piece of default code in the InitializeComponent method of the partial Designer class for the form was what caused the form to retain it's designer size. Uncomment it and everything works fine. Seems like .net framework 1.1 did not have this property set.
 
Back
Top