WindowsFormsApplicationBase.UseCompatibleTextRendering 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,此属性允许设计器指定应用程序窗体的默认文本呈现引擎。
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
必须在应用程序事件的“代码编辑器”窗口中输入此代码。 有关详细信息,请参阅应用程序页、项目设计器(Visual Basic)。
注解
默认情况下,此属性返回 False 以指示 Visual Basic 2005 的 GDI 文本呈现引擎用于应用程序的表单。 但是,可以重写此属性以返回 True 并指定应用程序的表单使用 GDI+ 文本呈现引擎,该引擎在 Visual Basic .NET 2002 和 Visual Basic .NET 2003 中使用。
构造函数调用 WindowsFormsApplicationBase 此属性。
重写类方法 WindowsFormsApplicationBase 的代码应在默认情况下隐藏的 ApplicationEvents.vb 文件中输入。
若要访问用于重写成员的代码编辑器窗口,请执行以下操作:
- 在解决方案资源管理器中选择项目后,单击“项目”菜单上的“属性”。
- 单击 “应用程序 ”选项卡。
- 单击“ 查看应用程序事件 ”按钮打开代码编辑器。
有关详细信息,请参阅应用程序页、项目设计器(Visual Basic)。