Taskbar Icon Showing Windows Default When Launched From IDE

I have a project group with several libraries and applications (one Delphi package and a lot of C++Builder applications and libraries - all 32-bit). Up until now I could run either Debug or Release applications from this stack and have the correct application icon show on the taskbar.

A little while back I decided to try FinalBuilder. I set up a FinalBuilder project to do all of the builds that my project group does when I select Build All in the IDE. I built all of the modules with the FinalBuilder script and everything was ok. I did note however that there were no icons in the executable files as seen from File Explorer. When I did the build I didn’t set icons for the executables in FinalBuilder - I thought that it would pull the icon settings in from the individual projects.

No matter, I thought - I will simply build-all in the IDE and that will put the icons back - and it did.

I have since noticed that all of the executables that were once built with FinalBuilder (with no icon set) now do not show the correct icon on the toolbar when launched from the IDE. Instead a default Windows executable icon is shown.

If I run these outside the IDE the correct icon shows.

I only built the Debug side of my stack with Final Builder and it seems that these are the executables that wont show the correct application icon on the taskbar when launched from the IDE. The Release applications all still work correctly in this regard.

I go back to an archive from just before the FinalBuilder test and everything is fine.

I “migrated” (make a new project folder and copy the project and source files) one of the applications into a new base folder and it works properly. I add that to the IDE project group and the Debug app doesn’t show the correct item again. I create a new project group and add just that project back in and both Debug and Release show properly.

I have tried deleting various iconcache files from the user\AppData folder and rebooting as suggested by some posts, but that made no difference.

It is great that the correct icon shows on the taskbar when the application is launched outside of the IDE, but it is annoying when things don’t work as they should.

I am not sure that this has anything to do with FinalBuilder. I tried a Project1 test where I created a Project1 VCL C++Builder application and then built it with FinalBuilder and then rebuilt it with the IDE and this didn’t show the wrong icon. In other words this didn’t reproduce the problem.

Any ideas?

Hi Mark

I suspect this issue may be actually due to FinalBuilder - you can control the icon and the version info from the C++Builder action - you need to make sure the “Regenerate Resource” option is enabled. This rebuilds the projectname.res file

Edit: Btw, reshacker is a great tool for checking resources in a exe/DLL
https://www.angusj.com/resourcehacker/

1 Like

Hi Vincent,

Thank you for your reply.

The problem is not getting the icon into the EXE.

The problem is getting it to show on the taskbar when the target application is launched from the IDE. Once again the icon show correctly on the taskbar if the target application is launched outside of the IDE.

I put the icon file into FinalBuilder C++Builder compile action and rebuilt. The icon shows on the taskbar when running externally, however from within the IDE it doesn’t.

I don’t know whether this has anything to do with FinalBuilder or RAD Studio or Windows or a combination.

open the cbproj file in notepad and look for Icon_MainIcon - that is what the IDE would be using when it compiles the resources.