Stinkin' Alt + Tab Icon

I've got a simple little application that has NO form border.  Additionally, the Show In Taskbar and Show Icon properties for the main form are set to false.  The application is started via Sub Main() with a call to Sub New in a class that inherits ApplicationContext.

Regardless of what I've tried, I can't get the stupid Icon out of the Alt + Tab window.  Setting the form border to Sizeable Tool Window worked but what's the point if I don't want a stupid friggin' border?



Oh yeah.  VB 2005 Express with .Net 2.0 framework.
Who is Participating?
Vaxman2Connect With a Mentor Commented:
Add this section of code to your form and you're good to go!

Protected Overrides ReadOnly Property CreateParams() As CreateParams
      Dim p As CreateParams = MyBase.CreateParams
      p.ExStyle = p.ExStyle Or &H80 ' WS_EX_TOOLWINDOW
      Return p
   End Get
End Property

I found this in a Usenet post written in C# and converted it to VB. I tested it and works!
I thought setting the ShowInTaskbar property to False also kept it out of the Alt+Tab list?
dds110Author Commented:
dds110Author Commented:
Works like a charm.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.