Solved

Stinkin' Alt + Tab Icon

Posted on 2006-10-31
4
281 Views
Last Modified: 2011-08-18
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?

HELP!!!!

TIA

Oh yeah.  VB 2005 Express with .Net 2.0 framework.
0
Comment
Question by:dds110
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17844846
I thought setting the ShowInTaskbar property to False also kept it out of the Alt+Tab list?
0
 
LVL 8

Author Comment

by:dds110
ID: 17844913
Nope!
0
 
LVL 7

Accepted Solution

by:
Vaxman2 earned 125 total points
ID: 17847636
Add this section of code to your form and you're good to go!

Protected Overrides ReadOnly Property CreateParams() As CreateParams
   Get
      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 http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms/msg/9dd4c98f65146974?hl=en& written in C# and converted it to VB. I tested it and works!
0
 
LVL 8

Author Comment

by:dds110
ID: 17849438
Works like a charm.  Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question