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):
And this is the resulting application icon after compiled:
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:
project1.res
file and re-build..dproj
file, open .dpr
file instead and let the Delphi IDE created a blank new .dproj
file. no luck.IconCache.db
file corrupted, deleted that file and restarted Windows, no help. Actually I used Resource Hacker to confirmed it's not the Windows Explorer displaying the wrong icon but it's the icon resource in the EXE is wrong... too strange..dproj
file from SVN to yesterday(the icon was ok yesterday)'s revision and no luck.Anything else do you suggest me to try? Thank you!
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.