2

I had a Delphi 6 application with a 16x16 icon. Recently I made the 64x64 version of it and recompiled the application.

This high-resolution icon is displayed on Windows 7 Superbar and in task manager when I run the application. It is displayed in .exe file properties.

But when I make a shortcut on desktop, it shows me a stretched low-resolution icon (16x16). When I go to this shortcut's properties - it shows me the 64x64 version. To display the High resolution icon on the shortcut I have to go to shortcut icon's properties, click on the only hi-res icon available, click "Ok" and "apply" and do this sequence twice.

If I delete the shortcut and try to create it again, it shows the 16x16 icon again until I assign the icon twice.

I have specially looked into .res file - there is only one icon.

I have cleared icons cache, logged out and logged in. Still no change of behaviour. Such a behaviour is reproducible on other computer with Windows 7.

I have no idea what is happening. Is it making the low-resolution version from high-resolution or it has cached the previous version somewhere?

TLama
  • 75,147
  • 17
  • 214
  • 392
Paul
  • 25,812
  • 38
  • 124
  • 247
  • That's a cache problem. You need to find a way to clear whichever cache has the old reference. You need more than 64px icon. You need at least 16, 32, 48 and 256 – David Heffernan Feb 21 '13 at 20:58
  • You need multiple size and color depth icons in the same icon file, so Windows has the proper selections to choose from; otherwise, it will scale the default icon to the resolution it needs. Perhaps [the answer here](http://stackoverflow.com/a/11874979/62576) can help. – Ken White Feb 21 '13 at 23:23
  • @Ken White: I will try multiple icons. You say: "otherwise, it will scale the default icon to the resolution it needs". The trick is that it needs an icon definitely bigger than 16x16, but shrinks it to 16x16 and then stretches to necessary size. What a stupidity! – Paul Feb 22 '13 at 18:41

1 Answers1

2

Open a command prompt window and enter:

taskkill /IM explorer.exe /F
DEL "%localappdata%\IconCache.db" /A
shutdown /r /f /t 00

This will rebuild the icon cache, which is very likely the source of your problem. Note, that the last command will shut down and restart your computer, so be sure to save any data before you execute the command.

iamjoosy
  • 3,299
  • 20
  • 30