4

I have several programs written in Delphi XE2 that were converted from Delphi 2005, which under Windows 7 would display horribly scaled icons when shortcuts were made on the Desktop.

Using IcoFX, I created a new icon containing the usual 4 sizes (256, 48, 32, 16) and went through my programs, going to the Appearance tab for each and loading the new icon.

After rebuilding them all, I switch Windows Explorer to Large Icons view and take a look at the programs in the Bin folder, but I found that only some of them show the new 256px icon. The others still show the smaller 48px one.

I've checked the Project options again, and they all seem to be the same, so I used Resource Hacker to look at the EXE's. All of them contain 4 icons, named 1, 2, 3, 4, of differing sizes, and they all contain an Icon Group with a MAINICON resource that includes all 4 sizes.

So I'm at a loss as to why some show Large Icons correctly while others don't. Anyone have any thoughts on this?

4
  • 2
    Windows is caching your icons most likely. You need to clear Windows' icon cache. Also, try placing these applications in a different folder where they haven't been before. Commented Nov 7, 2013 at 23:14
  • 2
    @Jerry This is the only plausible answer. Should be the answer. Commented Nov 7, 2013 at 23:47
  • @user check for icon cache by copying file to some other location and so forcing Windows to build new cache from the file. Commented Nov 7, 2013 at 23:48
  • @JerryDodge - If you make this an answer I will +1 it. I found this out some time ago, it was pretty annoying at the time I recall.
    – Shambhala
    Commented Nov 8, 2013 at 0:04

1 Answer 1

9

It sounds like you're experiencing Windows caching your icons. All executable files get their icons cached by Windows the first time they're shown, and thus if you change your icon, Windows will still display the old one because it's cached.

You should clear your icon cache. To do this, you need to delete a file which is in a hidden system folder, found at this location:

C:\Users\User-Name\AppData\Local\IconCache.db

Replace "User-Name" with the folder name of your user profile folder. Once you have deleted this, you must log off and back on, or kill / restart the explorer.exe process. After you do this, everything should show correctly.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.