C# Programming > Windows Forms

Remove Windows Form Titlebar
In C#

Why Titlebar-less

The reason for writing a Windows Form without a titlebar in C# is basically for creating different types of dialog boxes. Custom C# user controls are also can make use of a Form that does not draw the titlebar.

These are the three different types of Forms that can be easily made. This article will show you how to remove the title bar of Windows Forms:

c# no titlebar

Source Code

The common way to get rid of the titlebar is to set the Form's FormBorderStyle to None. That works, especially if you want to handle the Form's painting on your own. Otherwise here is a simple alternative:

this.ControlBox = false;
this.Text = string.Empty;

The two C# lines above will take care of removing the title-bar. The next step is to experiment with the FormBorderStyle property. You'll find that there is three different looks that you can achieve. Additionally if the Form is designed to be a pop-up dialog, you might want to add the following line:

this.ShowInTaskBar = false;

That keeps the Form from appearing in the taskbar, keeping the application more professional.

Back to C# Article List