Sign in to follow this  
DrGUI

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

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Thanks for your help jystic.

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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this