Form.GetAutoScaleSize(Font) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
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);
C#
public static System.Drawing.SizeF GetAutoScaleSize(System.Drawing.Font font);
C#
[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);
C#
[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
SizeF,表示窗体的自动缩放大小。
- 属性
重要
方法GetAutoScaleSize从 .NET Framework 2.0 开始已过时。 为了向后兼容,已保留此成员。 有关自动缩放的详细信息,请参阅 Windows 窗体 中的自动缩放。
在将字体应用于窗体之前,可以使用此方法确定窗体自动缩放特定字体的大小。 如果要根据当前分配给窗体的字体确定窗体自动缩放到的大小,请使用 AutoScaleBaseSize 属性。
产品 | 版本 (已过时) |
---|---|
.NET Framework | 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1) |
Windows Desktop | (3.0, 3.1, 5, 6, 7, 8, 9) |