This documentation is archived and is not being maintained.

Form.GetAutoScaleSize Method

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

[Visual Basic]
Public Shared Function GetAutoScaleSize( _
   ByVal font As Font _
) As SizeF
public static SizeF GetAutoScaleSize(
 Font font
public: static SizeF GetAutoScaleSize(
 Font* font
public static function GetAutoScaleSize(
   font : Font
) : SizeF;


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

Return Value

A SizeF representing the autoscaled size of the form.


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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Form Class | Form Members | System.Windows.Forms Namespace | AutoScaleBaseSize