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 的文字轉譯引擎。

範例

此範例示範如何覆寫 屬性,將 GDI+ 文字轉譯引擎設定為應用程式的預設轉譯引擎 UseCompatibleTextRendering

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)

備註

根據預設,此屬性會 False 傳回 ,指出Visual Basic 2005的 GDI 文字轉譯引擎會用於應用程式的表單。 不過,您可以覆寫這個屬性,以傳回 True 並指定應用程式的表單使用 GDI+ 文字轉譯引擎,這在 Visual Basic .NET 2002 和 Visual Basic .NET 2003 中使用。

這個屬性是由 WindowsFormsApplicationBase 建構函式呼叫。

覆寫 類別方法 WindowsFormsApplicationBase 的程式代碼應該在預設隱藏的 ApplicationEvents.vb 檔案中輸入。

若要存取覆寫成員的程式代碼 編輯器 視窗
1.在 方案總管 中選取專案時,單擊 [專案] 功能表上的 [屬性]。
2. 按一下 [應用程式]索引標籤。
3.按兩下 [檢視應用程式事件] 按鈕,以開啟程式代碼 編輯器。

如需詳細資訊,請參閱 Application Page, Project Designer (Visual Basic)

適用於

另請參閱