Click here to Skip to main content
15,885,537 members
Articles / Desktop Programming / Windows Forms
Alternative
Tip/Trick

Hiding the form from alt-tab menu

Rate me:
Please Sign up or sign in to vote.
4.50/5 (2 votes)
19 Dec 2010CPOL 12.1K   1   1
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)


Written By
Web Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralYes, the original code won't work as it is posted. You can s... Pin
Prerak Patel9-Dec-10 21:25
professionalPrerak Patel9-Dec-10 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.