WindowsFormsApplicationBase.UseCompatibleTextRendering 属性

定义

当在派生类中重写时,此属性允许设计器为应用程序窗体指定默认的文本呈现引擎。

protected:
 static property bool UseCompatibleTextRendering { bool get(); };
protected static bool UseCompatibleTextRendering { get; }
static member UseCompatibleTextRendering : bool
Protected Shared ReadOnly Property UseCompatibleTextRendering As Boolean

属性值

Boolean. 值 指示 False 应用程序应使用 Visual Basic 2005 的默认文本呈现引擎。 如果该值为 True,则指示应用程序应使用 Visual Basic .NET 2002 和 Visual Basic .NET 2003 的文本呈现引擎。

示例

此示例演示如何通过重写 UseCompatibleTextRendering 属性将 GDI+ 文本呈现引擎设置为应用程序的默认呈现引擎。

Protected Overloads Shared ReadOnly Property UseCompatibleTextRendering() As Boolean  
    Get  
        ' Use the GDI+ text rendering engine.  
        Return True  
    End Get  
End Property  

必须在应用程序事件的“代码编辑器”窗口中输入此代码。 有关详细信息,请参阅 Application Page, Project Designer (Visual Basic)(应用程序页、项目设计器 (Visual Basic)。

注解

默认情况下,此属性返回 False 以指示 Visual Basic 2005 的 GDI 文本呈现引擎用于应用程序的表单。 但是,可以重写此属性以返回 True 并指定应用程序的表单使用在 Visual Basic .NET 2002 和 Visual Basic .NET 2003 中使用的 GDI+ 文本呈现引擎。

此属性由 WindowsFormsApplicationBase 构造函数调用。

替代 类方法的代码 WindowsFormsApplicationBase 应在默认隐藏的 ApplicationEvents.vb 文件中输入。

访问用于替代成员的“代码编辑器”窗口
1. 在“解决方案资源管理器”中选择项目后,单击“项目”菜单上的“属性”。
2. 单击“应用程序”选项卡。
3. 单击“查看应用程序事件”按钮,打开“代码”编辑器。

有关详细信息,请参阅 Application Page, Project Designer (Visual Basic)(应用程序页、项目设计器 (Visual Basic)。

适用于

另请参阅