tags:

views:

275

answers:

2

I have an EXE which as Image1.ico as its Icon and i went to properties of the solution explorer->Application tab-> Selected Icon and Manifest and selected new image icon Image2.ico.

After i build and run the EXE, the EXE loads with old image icon (Image1.ico).

Any inputs on this?

Thanks in advance, Karthick

A: 

Check first for the icon and the resolution used for the icon. If it contains a 32x32 and a 16x16 image, then it could be that Visual Studio is messing up. To remedy this, saving the solution and close it, delete the EXE's in the 'bin\debug' and 'bin\release' directories. Re-open the solution and do a fresh build...

Hope this helps, Best regards, Tom.

tommieb75
Thanks, but didn't make the new icon, still the old icon is loading.
Karthick
A: 

Windows will normally use the first icon it finds in the file. So if Image1.ico is still in your resources, you need to remove it.

Windows also has an icon cache, and it might be showing you the icon from the cache rather than the new one from your exe. If you change the name of the .exe file, does it show the old icon or the new one?

Edit:

Ok since the problem is that the icon cache needs to be flush. Here's instructions on how to do it on Win7 and Vista http://www.winhelponline.com/blog/how-to-rebuild-the-icon-cache-in-windows-vista/ For Windows XP you can use Tweak UI http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx

John Knoeller
Thanks.When i changed to some other name the EXE shown up new logo , but when i ran it still displays old icon on the left part of the winform. Any inputs?
Karthick
You need to flush the icon cache. TweakUI has a page that does this. http://smallvoid.com/article/windows-icon-cache.html
John Knoeller
Thanks. http://www.winhelponline.com/blog/how-to-rebuild-the-icon-cache-in-windows-vista/ - I tried this in Vista, but the icon didn't change, still it displays old icon in the EXE. Can't think of any other way? please suggest some inputs.
Karthick
@Karthik: sorry, I don't have any other suggestions. The good news is that your app is OK, it only _looks_ wrong because of the icon cache.
John Knoeller
Even i restarted, not changing, sorry am also not able to think on any other option on this.
Karthick