Form.GetAutoScaleSize(Font) Form.GetAutoScaleSize(Font) Form.GetAutoScaleSize(Font) Method

Definition

Warning

This API is now obsolete.

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

public:
 static System::Drawing::SizeF GetAutoScaleSize(System::Drawing::Font ^ font);
[System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Drawing.SizeF GetAutoScaleSize (System.Drawing.Font font);
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF

Parameters

font
Font Font Font

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

Returns

A SizeF representing the autoscaled size of the form.

Remarks

Important

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.

Applies to

See also