Hide Icon of Windows Form

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
Who is Participating?
Mike TomlinsonMiddle School Assistant TeacherCommented:
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

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: http://msdn.microsoft.com/en-us/library/system.windows.window.hide.aspx

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."
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.