3
votes

The first time i update the icon in "project > Options > Application > Load Icon..." the icon as changed as it should, now every time i change the application icon, my app keep compiling with The old icon even if i click in "project > Options > Application > Default" or try to load a new one

The icon get stuck somewhere, but where ?

There's a way to force icon with resource file or unstuck the old icon ?

I download a icon which is a multi size ico file ( one ico file, 8 sizes )

i already try :

Reboot my computer. Change the .exe name. Copy the .exe to another computer.

same error.

3
Describe symptoms in detail. Sounds like system icon cache. Try reboot! - David Heffernan
reboot my computer change the .exe name Copy the .exe to another computer same error. - Rebelss
Describe symptoms very clearly. How do we reproduce? - David Heffernan

3 Answers

2
votes

Had the same experience recently as well. The "default" button does not seem to work as soon as you have selected an icon. I got rid of the icon via the following steps:

  1. Close your project.

  2. In your project folder an icon will be created with the name "Projectname"_ICON.ICO.

  3. Rename or remove this Icon.

  4. Reopen your project,

  5. Get to Project->Options,

  6. An error message will be raised at every configuration in which you have used the icon, but by pressing default the message will not reappear,

  7. Now the project is forced to use the default icon again.

Probably there is a more sophisticated manner, but I have not found it elsewhere.

1
votes

For Windows platform, the icon (and version info) is stored in resource file (.res). And by default Delphi project includes in exe all the .res files it founds in project directory (see {$R *.res} directive in your .dpr file).

So check all the .res files you have in your project directory to find out which of contains the default icon. You can use any resource editor for that. Then, just delete that file, but please keep backup, cause .res file may contain other important information.

0
votes

This was what helped me:

You can just run the following command to clear the icon cache:

ie4uinit.exe -ClearIconCache

For Windows 10, use:

ie4uinit.exe -show