共用方式為


Form.GetAutoScaleSize(Font) 方法

定義

警告

This method has been deprecated. Use the AutoScaleDimensions property instead. http://go.microsoft.com/fwlink/?linkid=14202

警告

This method has been deprecated. Use the AutoScaleDimensions property instead. https://go.microsoft.com/fwlink/?linkid=14202

取得根據指定字型自動縮放表單時所得的大小。

public:
 static System::Drawing::SizeF GetAutoScaleSize(System::Drawing::Font ^ 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);
[System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  https://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
[<System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF
[<System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF
Public Shared Function GetAutoScaleSize (font As Font) As SizeF

參數

font
Font

Font,代表決定表單之自動縮放基準大小的字型。

傳回

SizeF,代表表單的自動縮放大小。

屬性

備註

重要

方法 GetAutoScaleSize 已過時,從 .NET Framework 2.0 開始。 此成員已保留以供回溯相容性使用。 如需自動調整的詳細資訊,請參閱自動調整Windows Forms

您可以使用此方法來判斷表單自動調整為特定字型的大小,再將字型套用至表單。 如果您想要根據目前指派給表單的字型自動調整表單大小,請使用 AutoScaleBaseSize 屬性。

適用於

另請參閱