Reputation: 2779
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.
Upvotes: 30
Views: 47544
Reputation: 1
For me the Fix that wont load the ICON on the desktop was just restart the Window Explorer on the TaskManager
Upvotes: 0
Reputation: 373
If nothing else works, try restarting the Windows Explorer process:
Upvotes: 4
Reputation: 577
I had the same problem. The "first place" mentioned by Patrick is about the file icon, i.e. the .exe aspect. The "second place" is about the form (in the upper left corner). Restarting windows file explorer seemed to be a satisfactory solution too. But all this didn't work today. I didn't restart the computer, by the way. This is what really displayed the new icon in the task bar: I realized that there was an old shortcut of the .exe on the desktop. Deleting the shortcut did the job.
Upvotes: 0
Reputation: 891
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.
Upvotes: 51
Reputation: 140753
You have two place to change your icon.
The first place is in the project.
The second place is in the property of your Winform.
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.
Upvotes: 71
Reputation: 455
I had the same problem and none of the above solved it.
In my case, I had defined the icon different for two different langages (default language english and german). You can see this if there appear two resources files: FormX.resx
and FormX.de.resx
With the accepted answer only default icon was changed. But when running the application on my pc the german icon was used.
So I had to change the icon for both resources. In Visual Studio you can change the current resource language by switching the language item (in the forms properties) from default to another language.
Upvotes: 0
Reputation: 351
Check this out for icon information and sizes it supports. Assuming this is just a simple error that you are getting check if your ico's are as per what is specified here http://msdn.microsoft.com/en-us/library/ms997636.aspx
Upvotes: 0
Reputation: 5226
As a commenter mentioned, you should set in the properties of the *.ico file: Copy to Output Dir: Copy if newer.
This property is not absolutely required. I developed a winform application and tested it without icon. Then I created and added the icon. The icon showed when running with the VS debugger. I copied the bin/debug directory to another pc and there it ran with showing the icon.
But the icon did not show on the development machine when the app started by clicking the *.exe file.
Logout/login windows did not cure this.
Change the Copy To Output Dir property on the icon file to Copy If Newer, and rebuild the application, did help. Now I can start the app by clicking the *.exe and the icon shows nicely.
Conclusion:
It is not always required to build the app with the icon file copied to the output directory, but with this measure you will increase your chances.
Upvotes: 2
Reputation: 119
In your Main_Load
function add:
this.Icon = Properties.Resources.newIcon;
Upvotes: 0
Reputation: 48230
Make sure that your *.ico file contains an icon of the proper size (like 16x16 for small task bars).
Upvotes: 1