I\'m trying to customize the icon that shows in Windows Explorer and in Desktop shortcuts for my Delphi application.
In the Delphi 7 IDE, I have loaded the desired icon
Maybe the icon cache needs to be deleted. There are many pages about this problem, this link might be useful: http://smallvoid.com/article/windows-icon-cache.html
I found it after more hunting. I created a new project by copying an existing project from another folder. I forgot to change the program name at the top of the DPR file to match the name of the new project. Somehow, if a wrong name is used there, it prevents the icon from being changed in the generated EXE file...
When you assign an icon to an application, the icon will be embedded in a .res file named identical to the program name (the name mentioned in the first line of the .dpr file). When you change the program name in the .dpr file, delphi creates a new .res file with the new program name and looks for the icon resource in the new res file and finds none, and hence uses the default icon (or a rectangular white box). The old res file which carries the icon resource will no longer be used. In summary, if you change the program name, you will have to re-assign the icon.