Solved

Stinkin' Alt + Tab Icon

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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