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 ?
1 Answer. Show activity on this post. To prevent your form from appearing in the taskbar, set its ShowInTaskbar property to False.
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.
The proper method would be Application. Exit() .
In code do the following:
this.ShowInTaskbar = false;
Or in Design mode:
EDIT:
You must also set the FormBorderStyle
Code:
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
Design:
This definitely does work - these are some screen prints using Windows Vista.
App running:
Not appearing in ALT + TAB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With