Reputation: 16821
I have a C# project which is nearly done and it's huge enough not to think of rewriting it. Now that I'm almost finished I thought of setting an Icon for it, making it pretty. After lots of error and trial I created a 256*256 .ico file and set it as the application's icon in the following panel:
The problem is that in Windows Explorer the .exe file's icon won't get bigger than 32*32 pixels (or maybe it's 48*48, I'm not sure) and there's an ugly box around the icon (which I think Windows put it there when the appropriate icon size could not be found). It's in the case that as I said before the icon is a 256*256-only .ico file (there's only one frame within the file and that's 256*256 pixels).
So to test it further, I created another project similar to the previous one and set the very same icon file and to my surprise the compiled .exe file's icon grows as big as other icons would in Windows Explorer.
Can anyone how can I fix this? Is it possible that Windows Explorer is showing the older one from a cache? If so how can I reset that cache?
[UPDATE]
I managed to prove that it's Windows Explorer's fault since it caches icons and it was showing me an old version of my icon. So how can one reset the cache of Windows Explorer?
Upvotes: 2
Views: 1115
Reputation: 612794
The icon cache is almost certainly the culprit here. The system is quite aggressive in caching icons because it views these as being static. Of course, that conflicts with a developer experimenting with an application.
An easy way to check is to take the executable file that has the wrong icon and rename the file. That's enough to bypass the cache and your large icon should show up.
Instructions on rebuilding the icon cache: http://www.sevenforums.com/tutorials/49819-icon-cache-rebuild.html
Upvotes: 2