DCSIMG
Beware of the AutoScaleBaseSize property - Dotmad (on .Net)

Dotmad (on .Net)

Just Another Web 5.0 Blog

Podcasts

Blogroll

Beware of the AutoScaleBaseSize property

I have had a problem recently with some of the form in my application, which were descendants of a custom form class (not the classic Windows.Forms.Form class).
The form would look fine in design mode, but during run time it appeared to have shrunk, with all the controls in it being affected similarly.

It took a lot of digging to find out what was wrong, but after noticing that setting the AutoScale property to "false" seemed to solve the problem the culprit was found - While in a "normal" form the "initializecomponents" method contained this line:
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
In the new forms it has somehow changed to:
this.AutoScaleBaseSize = new System.Drawing.Size(7, 17);
Thus affecting all such forms.

Now I need to fix this line, but I'm still troubled by not knowing what caused it to change in the first place....
פורסם: Sep 13 2007, 09:12 PM by Dotmad | with 1 comment(s)
תגים:

תוכן התגובה

Dotmad כתב/ה:

I previously wrote about a problem with a custom form's property. Since then I found problems with

# September 29, 2007 11:21 PM