Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding winforms app from taskbar

Tags:

How can I hide a winform, so that it t will not show in the Windows taskbar , user do not see it , or when the user presses Alt + Tab ?

like image 802
Ata Avatar asked Oct 10 '10 15:10

Ata


People also ask

How do I hide the Windows form on my taskbar?

1 Answer. Show activity on this post. To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.

How do I hide a form in Visual Studio?

Press F5 to build and run the application. Click on the button in the main form to display the sub form. Now, when you press the button in the sub form, the form will be hidden.

How do I cancel my WinForms application?

The proper method would be Application. Exit() .


1 Answers

In code do the following:

this.ShowInTaskbar = false;

Or in Design mode:

alt text

EDIT:

You must also set the FormBorderStyle

Code:

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;

Design:

alt text

This definitely does work - these are some screen prints using Windows Vista.

App running:

alt text

Not appearing in ALT + TAB

alt text

like image 122
codingbadger Avatar answered Sep 19 '22 16:09

codingbadger