Mirror

How to remove the icon of an application from the Windows Taskbar (Views: 707)


Problem/Question/Abstract:

Is there any way to remove the icon of my application from the Windows Taskbar?

Answer:

In the main form's OnShow event add:

ShowWindow(Application.Handle, SW_HIDE);

This will keep the taskbar button from showing. Now when the application is minimized, the button will appear. If you want to remove the button again on restore add to the MainForm's OnCreate event:

Application.OnRestore = Form1OnShow; {This should be the OnShow event}

and the button will rehide on restore.

<< Back to main page