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…
Check TX Text Control Template Dependencies Before Deployment
When templates are moved from Windows to Linux, from TX Text Control Classic to Core, or from one server to another, missing fonts, images, merge fields, blocks, and form field names can break…
Create 100,000 Documents in Under an Hour with Parallel MailMerge in .NET C#
The DocumentServer.ParallelMailMerge NuGet package makes it simple to process MailMerge jobs in parallel worker processes. This article shows when to use it, how to call it, and how worker counts…
Speed Up Document Generation by Factor 2 Using Selection Objects in .NET C#
This article compares two ServerTextControl document generation patterns: Assigning prebuilt Selection objects and formatting text after inserting and selecting it. The benchmark shows an…
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.…
