Welcome to MSDN Blogs Sign in | Join | Help

SetCompatibleTextRenderingDefault

There were several changes in Windows Forms for .NET Framework 2.0 that came down the pipe too late for us to document in time for RTM. Once of these was the SetCompatibleTextRenderingDefault() method on System.Windows.Forms.Application.

I've since documented it; this new text is currently live on MSDN2. In case you have trouble accessing that, here's what I had to say:

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. Use SetCompatibleTextRenderingDefault 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.

No sample code, since the call is very simple. Just stick this in your Main() method before calling Application.Run(), and you're set.

Published Tuesday, January 31, 2006 6:24 PM by WinFormsUE

Comments

Friday, September 15, 2006 8:47 AM by おぎわら@.NET道場 Blog(わんくま編)

# UseCompatibleTextRendering にもてあそばれる

UseCompatibleTextRendering にもてあそばれる
Friday, September 15, 2006 12:48 PM by おぎわら@.NET道場 Blog(わんくま編)

# UseCompatibleTextRendering にもてあそばれる

UseCompatibleTextRendering にもてあそばれる
Anonymous comments are disabled
 
Page view tracker