Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# - Changing the icon of the taskbar

Tags:

I want to change the icon on the taskbar of my software, so I changed the project settings. This path was suggested by Visual Studio itself

Path to the icon

But my taskbar still shows the same icon as before (the standard one) - In my Explorer the .exe has the correct icon, it just won't change in the taskbar.

I also tried to end explorer.exe and restart the task, but this didn't help at all. I also tried to set the resolution on 16x16 and 32x32 but both didn't work.

like image 892
loomie Avatar asked Mar 06 '13 11:03

loomie


2 Answers

You need to give your form that icon as well. The application icon is the one that is embedded in the application and displayed in Explorer or on shortcuts. Each form can have its own icon, though.

like image 87
Joey Avatar answered Oct 11 '22 10:10

Joey


I've noticed a couple of things with Windows 7 and Windows 8. The Windows Taskbar icon is taken from the programs Shortcut's icon, not the applications icon.

If you assign your application an Icon through Visual Studio it will set an icon that appears in the form as well as in the notification area. However the taskbar icon and any shortcut's you create will not take the icon from the application, as they used to, instead they are created with the default shortcut icon.

So I found that I had to set up the Shortcut icon's (that lives in the Start Menu) as part of my installer for the application.

I don't have to do this for Windows XP.

like image 23
Amicable Avatar answered Oct 11 '22 08:10

Amicable