Products Technologies Demo Docs Blog Support Company

Enable Visual Styles in Visual Studio Projects

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…

Enable Visual Styles in Visual Studio Projects

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());
}

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ClickOnce.NETVisual Studio

ClickOnce Deployment with TX Text Control .NET for Windows Forms

ClickOnce is a new .NET application deployment technology that makes it possible to deploy a Windows Forms based application through Internet Explorer. From Microsoft MSDN: With ClickOnce running,…


ASP.NETDockerLinux

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.


Windows FormsWPF.NET

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.


ASP.NETWindows FormsWPF

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.