# [.net] AutoScaleBaseSize to what in .NET 2.0?

This topic is 4532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi! I've just moved to the VS 2005 Beta 2 and I've banished the key file signing warnings (using the project properties rather than attribute) but I don't know what to change this to.
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
is in all of my forms - I've read up on auto scaling so can I just change this to AutoScaleDimensions? Thanks EDIT: also, how would I disambiguate this:
<see cref="TrimToSize"/>
would I put "TrimToSize()" or "TrimToSize(bool)" ? I've never done that before :D

##### Share on other sites

Have a look at the following post, it referances a link on MS regarding the change.

Inner Realm - Obsolete code in sample framework

##### Share on other sites
Thanks - but no replies yet. They seem to be the same thing - but I think it said that AutoScaleDimensions just has higher precision :S

##### Share on other sites
Yeah AutoScaleBaseSize has been the bane of my Windows Forms experience for the last few years because it takes a Size struct (int) not a SizeF struct (float).

Obviously this gives innaccuracies when scaling the form to non standard dpi settings as only integer math is used to determine what size all the controls should be :/

This is fixed in .NET 2.0 as the property is replaced with a floating point alternative (AutoScaleDimensions).

##### Share on other sites
I set it to an integer Size - I just changed the name. Didn't get a compilation error though :S

Thanks

##### Share on other sites
Yeah it will should accept that aswell, it's just it will also take floating point sizes :)

##### Share on other sites

EDIT: did I rate you wrongly? Your rating was 1006, I rated you helpful then it was 1002! I don't think it will let me rate again...I'm sure I had the right option selected...
Logged out and in again - I had selected the right option (yay something not my fault)

##### Share on other sites

This topic is 4532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.