Rediger

Del via


WindowsFormsApplicationBase.UseCompatibleTextRendering Property

Definition

When overridden in a derived class, this property allows a designer to specify the default text rendering engine for the application's forms.

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

Property Value

Boolean. A value of False indicates that the application should use the default text rendering engine for Visual Basic 2005. A value of True indicates that the application should use the text rendering engine for Visual Basic .NET 2002 and Visual Basic .NET 2003.

Examples

This example demonstrates how to set the GDI+ text rendering engine as the application's default rendering engine by overriding the UseCompatibleTextRendering property.

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

You must enter this code in the Code Editor window for application events. For more information, see Application Page, Project Designer (Visual Basic).

Remarks

By default, this property returns False to indicate that the GDI text rendering engine for Visual Basic 2005 be used for the application's forms. However, you can override this property to return True and specify that the application's forms use the GDI+ text rendering engine, which is used in Visual Basic .NET 2002 and Visual Basic .NET 2003.

This property is called by the WindowsFormsApplicationBase constructor.

Code that overrides methods of the WindowsFormsApplicationBase class should be entered in the ApplicationEvents.vb file, which is hidden by default.

To access the Code Editor window for overriding members
1. With a project selected in Solution Explorer, click Properties on the Project menu.
2. Click the Application tab.
3. Click the View Application Events button to open the Code Editor.

For more information, see Application Page, Project Designer (Visual Basic).

Applies to

See also