1
votes

I had a problem with 256x256 icons in .ico files not saving/showing correctly, see this question.

I seem to have solved the problem with the .ico file, but it still shows as a black square when I compile it in my Windows program (compiled with Delphi). The small icon shown in Windows Explorer details is fine, but the large icon shown with thumbnail view remains black. Any suggestions?

clarification re Martin's comment
I'm talking about the application icon, for Windows (in particular Explorer), not for use by the program itself. Windows shows the small icon (16x16 I guess) in the details, list, and small icons view, as well as in the taskbar. The 256x256 icon is shown in the extra large icon view.

BTW, I'm using Windows 7.

1
Verify what sizes and color resolutions are present in your icon file. Then show the code you expect to display the icon. If you are talking about your application icon, tell us where you expect it to be displayed and in what Windows version.Martin Maat
@downvoter How do you expect me to improve my question if you don't tell me what's wrong with it in the first place?Joris Groosman
Perhaps it's the icon cache. Restart your machine.David Heffernan
@David That's it! If you post it as an answer (maybe expanding it a bit), I'll accept it.Joris Groosman
This issue really has nothing to do with Delphi at all (it could help someone using C++ with an icon resource linked as well). I wonder if this should be edited and retagged.Warren P

1 Answers

3
votes

It sounds like the system has cached the defective icon and is not taking account of your updated icon. This is a common problem. There are various solutions, but far and away the simplest is to restart the machine.