Note: This method is new in the .NET Framework version 2.0.
Sets the application-wide default for the UseCompatibleTextRendering property defined on certain controls.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Public Shared Sub SetCompatibleTextRenderingDefault ( _ defaultValue As Boolean _ )
Dim defaultValue As Boolean Application.SetCompatibleTextRenderingDefault(defaultValue)
public static void SetCompatibleTextRenderingDefault ( bool defaultValue )
public: static void SetCompatibleTextRenderingDefault ( bool defaultValue )
public static void SetCompatibleTextRenderingDefault ( boolean defaultValue )
public static function SetCompatibleTextRenderingDefault ( defaultValue : boolean )
Parameters
- defaultValue
-
The default value to use for new controls. If true, new controls that supportUseCompatibleTextRendering use GDI+ for text rendering; if false, new controls use GDI+.
Exception type | Condition |
---|---|
InvalidOperationException |
You can only call this method before the first window is created by your Windows Forms application. |
Certain Windows Forms controls can render their text using either the GDI graphics library, or the newer GDI+ library. This change was made because of performance and localization issues with GDI+. By default, existing controls that support the UseCompatibleTextRendering property are set to true for backwards compatibility, but all new controls in environments such as Visual Studio have this property set to false. UseSetCompatibleTextRenderingDefault when you wish to switch the default text rendering for new controls.
You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications.
this pageWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, seeSystem Requirements.
.NET Framework
Supported in: 2.0Reference
Application ClassApplication Members
System.Windows.Forms Namespace