Click here to Skip to main content
12,623,882 members (28,214 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


10 bookmarked

Hiding the form from alt-tab menu

, 19 Dec 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
Hiding the form from alt-tab menu
This is a UI tweak for hiding the form from alt-tab menu.

protected override CreateParams CreateParams
      CreateParams cp = base.CreateParams;
      cp.ExStyle |= 0x80;
      return cp;

In order to make it work, you have to use Me.ShowInTaskbar = False


WS_EX_TOOLWINDOW bit is turned on by OR-ing ExStyle with 0x80.

The following always works,
Me.FormBorderStyle = FormBorderStyle.SizableToolWindow;
Me.ShowInTaskbar = False;

But if you have a borderless form, i.e., FormBorderStyle.None then ShowInTaskbar = False doesn't work. So, we should set the WS_EX_TOOLWINDOW to true in addition to Me.ShowInTaskbar = False.


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


About the Author

Software Developer
India India
is a poor software developer and thinker. Presently working on a theory of "complementary perception". It's a work in progress.

You may also be interested in...

Comments and Discussions

GeneralReason for my vote of 1 My vote of 1, to post the code that ... Pin
prerakpatel9-Dec-10 22:23
mvpprerakpatel9-Dec-10 22:23 
GeneralYou might mention, in a short sentence, why that works and w... Pin
Walt Fair, Jr.9-Dec-10 14:50
subeditorWalt Fair, Jr.9-Dec-10 14:50 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161128.1 | Last Updated 19 Dec 2010
Article Copyright 2010 by tumbledDown2earth
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid