65.9K
CodeProject is changing. Read more.
Home

Hiding the form from alt-tab menu

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.50/5 (2 votes)

Dec 10, 2010

CPOL
viewsIcon

12661

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: