delphiresourcesiconsdelphi-xe4

Delphi - Icon of compiled EXE is wrong and cannot be changed


I'm having this strange issue for the first time in my 15+ experience of using Delphi. This is the icon I set in the project options (XE4): enter image description here

And this is the resulting application icon after compiled:

enter image description here

I've no idea where does that icon come from and I have no way to change the icon (really driving me crazy).

The icon of this project has been ok for over a year until later today. Things I've tried with no luck:

Anything else do you suggest me to try? Thank you!


Solution

  • Review the line in your main form with {$R *.res}. I had the same issue and it was that this line was accidentally deleted. That caused that icon and other resouces to not be correct in the final executable, like version number, icons etc.

    If you don't know what that line is, simply make a few empty new vcl application and search it in the main form.