Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / desktop / WinForms

Hiding the form from alt-tab menu

4.50/5 (2 votes)
19 Dec 2010CPOL 12.6K  
Tried it in VB.NET Winforms app, but no luck. It's still shown in the alt-tab menu:Protected Overrides ReadOnly Property CreateParams As System.Windows.Forms.CreateParams Get Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H80 ...
Tried it in VB.NET Winforms app, but no luck. It's still shown in the alt-tab menu:

Protected Overrides ReadOnly Property CreateParams As System.Windows.Forms.CreateParams
       Get
           Dim cp As CreateParams = MyBase.CreateParams
           cp.ExStyle = cp.ExStyle Or &H80
           Return cp
       End Get
   End Property


An easier way to do this is:

Me.FormBorderStyle = FormBorderStyle.SizableToolWindow
Me.ShowInTaskbar = False


Just like it mentions in this article, The original author's... since the tip doesn't work, I hate to say "it looks like you've just copied & pasted" :doh:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)