Enable Visual Styles in Visual Studio Projects
TX Text Control version 13.0 introduced Windows color scheme support for all toolbars and bars using the ColorScheme setting on ButtonBar, RulerBar, and StatusBar styles. Activating them requires calling Application.EnableVisualStyles() in Main() before creating controls.

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()
{
<strong>Application.EnableVisualStyles();</strong>
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}Related Posts
ClickOnce Deployment with TX Text Control .NET for Windows Forms
Deploy a TX Text Control .NET for Windows Forms application through ClickOnce in Visual Studio 2005. The guide covers adding redistributable files, setting Build Action to Content, configuring…
Getting Started: ServerTextControl and MailMerge in a .NET 8 Console…
This article shows how to create a .NET 8 console application on Linux using Docker and WSL that uses the ServerTextControl to create a document and MailMerge to merge JSON data into the document.…
ASP.NETASP.NET CoreDocument Editor
Upgrading an ASP.NET MVC Web Application to an ASP.NET Core Web App
This article explains how to upgrade a .NET Framework ASP.NET MVC Web Application to an ASP.NET Core Web App using the .NET Upgrade Assistant.
Create a Table of Contents in Windows Forms using C#
This article explains how to create a table of contents in Windows Forms using the ribbon or programmatically. Creating a table of contents is required to organize large documents.
Visual Studio 2022 and .NET 5, 6 and 7 (Preview) Support and Strategy
With the release of TX Text Control 31.0, we will fully support .NET 5, 6 and 7 (Preview) within Visual Studio 2022 including Windows Forms designer support, NuGet packages and deployment support.
