SystemFonts 类

定义

指定用于在Windows显示元素中显示文本的字体。

public ref class SystemFonts abstract sealed
public ref class SystemFonts sealed
public static class SystemFonts
public sealed class SystemFonts
type SystemFonts = class
Public Class SystemFonts
Public NotInheritable Class SystemFonts
继承
SystemFonts

注解

SystemFonts 类的每个属性返回一个用于显示特定Windows显示元素(如窗口标题栏)中的文本的 Font。 这些字体反映控制面板中的当前设置。

注释

在 .NET 6 及更高版本中,包含此类型的 System.Drawing.Common 包 仅支持在 Windows 操作系统上运行。 在跨平台应用中使用此类型会导致编译时警告和运行时异常。 有关详细信息,请参阅 仅在 Windows 上支持的 System.Drawing.Common。

属性

名称 说明
CaptionFont

获取用于在窗口标题栏中显示文本的一个 Font

DefaultFont

获取应用程序可用于对话框和窗体的默认字体。

DialogFont

获取应用程序可用于对话框和窗体的字体。

IconTitleFont

获取用于图标标题的一个 Font

MenuFont

获取用于菜单的一个 Font

MessageBoxFont

获取用于消息框的一个 Font

SmallCaptionFont

获取一个 Font 用于在小窗口的标题栏中显示文本,例如工具窗口。

StatusFont

获取用于在状态栏中显示文本的 a Font

方法

名称 说明
GetFontByName(String)

返回与指定的系统字体名称对应的字体对象。

适用于