Share via


Control.FontHeight 属性

获取或设置控件的字体的高度。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Protected Property FontHeight As Integer
用法
Dim value As Integer

value = Me.FontHeight

Me.FontHeight = value
protected int FontHeight { get; set; }
protected:
property int FontHeight {
    int get ();
    void set (int value);
}
/** @property */
protected int get_FontHeight ()

/** @property */
protected void set_FontHeight (int value)
protected function get FontHeight () : int

protected function set FontHeight (value : int)

属性值

控件的 Font 的高度(以像素为单位)。

备注

提示

不应将 FontHeight 属性设置为控件的 Font.Height 值之外的任何值,或 -1。将 FontHeight 设置为 -1 会导致缓存高度值被清除,下次引用该属性时会重新计算此值。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Control 类
Control 成员
System.Windows.Forms 命名空间
Font.Height