GetAutoScaleSize Method
Collapse the table of content
Expand the table of content

Form.GetAutoScaleSize Method (Font)

Note: This API is now obsolete.

Gets the size when autoscaling the form based on a specified font.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[ObsoleteAttribute("This method has been deprecated. Use the AutoScaleDimensions property instead.")]
public static SizeF GetAutoScaleSize(
	Font font


Type: System.Drawing.Font

A Font representing the font to determine the autoscaled base size of the form.

Return Value

Type: System.Drawing.SizeF

A SizeF representing the autoscaled size of the form.


The GetAutoScaleSize method is obsolete in.NET Framework version 2.0. This member has been retained for backward compatibility. For more information about automatic scaling, see Automatic Scaling in Windows Forms.

You can use this method to determine the size a form would autoscale to for a specific font before applying the font to the form. If you want to determine the size a form is autoscaled to based on the font currently assigned to the form, use the AutoScaleBaseSize property.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft