Jun 29
When you show a .NET Form, by default the form will appear in the Windows Start bar and in the list of open windows shown when the user presses Alt+Tab.
Hide Form from Start Bar
To prevent a form from appearing in the Windows Start bar, add this statement to the form's constructor:
this.ShowInTaskbar = false;
Hide Tool Window from Alt+Tab
To prevent a form from appearing in the list of windows shown when the user presses Alt+Tab, you can designate the form to be a tool window. Note that you can use SizableToolWindow or FixedToolWindow, and ShowInTaskbar must be set to false:
this.FormBorderStyle = FormBorderStyle.SizableToolWindow; this.ShowInTaskbar = false;
Hide Borderless Form from Alt+Tab
However, if you want the form to be borderless, then you need to add the following statements to the form's constructor:
this.FormBorderStyle = FormBorderStyle.None; this.ShowInTaskbar = false;
AND you must add the following method to your derived Form class:
protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; // turn on WS_EX_TOOLWINDOW style bit cp.ExStyle |= 0x80; return cp; } }
Popularity: 27% [?]
Related posts:
.NET, C#, Tips, Windows Forms

Here is your +1
Thnks for the code for Borderless Forms. I used it for creating custom ContextMenu.
Thank You Very Much .. Good Job Man !!
Thank you.
Vielen Dank
Thank you very much. Its great.
The bordless from alt+tab was really useful. Thank you.
i am running a exe at the time of system startup.the form's are In-Visible but when i click alt+tab a blank window in visible.how can i ignore that window.please send me the solution through this mail ID.
with Regards,
santosh
Excellent post. Thank you.
Excellent man! It really works. Thanks
Thanks for making idea of borderless form. Excellent work.
It works after program start. But once I have set window state to normal and then back to minimized, the tool appears in the alt+tab-list.
(I have a tool reduced to a notifcation icon which checks for a file periodically and pops up with the file content if it finds one.)
private void toggleVisible(bool mode) {
this.TopMost = mode;
if (mode) {
this.WindowState = FormWindowState.Normal;
} else {
//also called from constructor:
this.WindowState = FormWindowState.Minimized;
this.FormBorderStyle = FormBorderStyle.SizableToolWindow;
this.ShowInTaskbar = false;
}
}
Thank you very much, the code work's perfect. I've converted it to VB.NET should anyone need it:
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
' turn on WS_EX_TOOLWINDOW style bit
cp.ExStyle = cp.ExStyle Or &H80
Return cp
End Get
End Property