Skype:TextControlSupport
Orders:877-462-4772
TX Text Control - word processing components.
« »

Enable visual styles in Visual Studio projects

Blogged by Björn Meyer on March 27, 2007 and tagged with Visual Studio, .NET.

Since version 13.0 of TX Text Control, all toolbars support the Windows color schemes that can be selected through the system settings. This new design can be selected through the ColorScheme setting of the ButtonBar.ButtonStyle, ButtonBar.BorderStyle, RulerBar.BorderStyle and StatusBar.BorderStyle properties.

By default, the new border and button style is ColorScheme. If the visual styles are not enabled in the application, buttons, tree-views or any other controls do not use the style.

The Application.EnableVisualStyles method enables these styles for the complete application. The visual styles will be used, if the control and the operating system support them. This method must be called before the controls can be created.

Therefore, you simply need to insert one line of code into the Main() function:

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
« Prev:Read only text frames in TX Text Control .NET
» Next:Getting the text of a specific page without the Selection class

top

Top 10 Bestselling Product Award 2007Top 25 Publisher Product Award 2007Top 10 Bestselling Product Award 2007 in JapanTop 25 Bestselling Product Award 2006Top 25 Bestselling Publisher Award 2006Reader's Choice Award, dot.net magazin, 3rd place