Hide  Icon of Windows Form

Posted on 2011-10-19
Last Modified: 2012-06-21
In my Windows.Forms application I open a seperat Dialog "myTitel", which presents the Titlebar of my app. I set the property ShowInTaskbar = false;
There is no Icon in the Taskbar, but when I press Alt+Tab to switch between applications, I still have the the Dialog as an icon.
How can I hide it there aswell?

My application is still on .NET 1.1
Question by:ICSAutomation
    LVL 13

    Assisted Solution

    by:Naman Goel
    LVL 85

    Accepted Solution

    Just set the extended window style WS_EX_TOOLWINDOW in CreateParams:
    public partial class myTitle : Form
            public myTitle()
                this.ShowInTaskbar = false;
            private const int WS_EX_TOOLWINDOW = 0x80;
            protected override CreateParams CreateParams
                    CreateParams cp = base.CreateParams;
                    cp.ExStyle |= WS_EX_TOOLWINDOW;
                    return cp;

    Open in new window


    Expert Comment

    Hiding an application in Taskbar will not hide the Window. If you hide the Window it should not show up in the ALT+TAB List.

    Try this:

    You will have to control the State of the Window then ... perhaps have the application in the System Tray
    and have the application hide and show when the tray icon is clicked.

    "If you do not want the application to be visible at all, consider creating a service instead."

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    746 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

    14 Experts available now in Live!

    Get 1:1 Help Now