Solved

Stinkin' Alt + Tab Icon

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
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…

758 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

21 Experts available now in Live!

Get 1:1 Help Now