Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Icon doesn't change correctly using c#

Tags:

c#

.net

winforms

I changed my Application's icon with a new one, by going to: "Project/MyProject Properties/Icon and Manifiest", and loading the new icon. Now, in my debug folder the icon of my .exe file appears with the new icon, which is ok, but when I execute the .exe, the application icon in the taskbar is still showing the old one.

Please advise.

like image 533
Somebody Avatar asked Sep 03 '25 14:09

Somebody


2 Answers

You have two place to change your icon.

First place

The first place is in the project.

  1. Right click on the project
  2. Select Property
  3. Go in Application Tabs
  4. Choose Icon and Manifest and select the icon you want

enter image description here

Second place

The second place is in the property of your Winform.

  1. Open the Form
  2. Click on the Form
  3. Press F4 or go in the property of the Form
  4. Go down in the property to find "Icon"
  5. Select the icon you want.

enter image description here

The reason you have a different icon in the taskbar than your application (.exe) icon is that the taskbar use the current form icon to display in the taskbar.

like image 65
Patrick Desjardins Avatar answered Sep 05 '25 16:09

Patrick Desjardins


After encountering the same problem, I resolved it by doing the following:

Just stop your explorer.exe from task manager and rerun the explorer.exe again.

like image 30
pan4321 Avatar answered Sep 05 '25 15:09

pan4321