Solved

Stinkin' Alt + Tab Icon

Posted on 2006-10-31
4
277 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now