Jump to content
TLG

Project Release Icon not Showing

Recommended Posts

Using Delphi Tokyo

 

When building a Debug Version the Icon set in the Projects Options is correct for the Application Icon

When building the Release Version it is using the Delphi Default Icon as the Application Icon

 

I created a new project with just 1 form no components and still the same problem

 

This had been working preciously over last 12 months.

 

Any help appreciated.

Share this post


Link to post
Guest

Some platforms do not allow running applications that do not provide application icons. RAD Studio provides default application icons, so that you can test your application on any platform even if you do not have icons for your application yet. However, before you publish your application you must replace the default RAD Studio icons with custom icons for your application. The following sections explain how to configure your application to use your custom icons.

 

https://docwiki.embarcadero.com/RADStudio/Sydney/en/Creating_and_Deploying_App_Icons

 

https://stackoverflow.com/questions/39942848/wrong-icon-used-as-default-icon-after-loading-icons-from-a-res-file

Edited by Guest

Share this post


Link to post

Hi,

 

Thanks for your Help.

I have selected the icons that I wish to use in the Projects/Options 

It has been working for over a year.

 

If I set to Debug Release, the Icon for the created Debug application is correct.

If I set to Release Release, the Icon for the created Release application is the Default Delphi Icon

Share this post


Link to post
3 hours ago, TLG said:

It has been working for over a year.

There's probably many reasons why it suddenly doesn't work, in previous versions of Delphi when this happened to me it helped just to re-set the icons. So, clear icons to produce default Delphi icons, re-start IDE and set new icons. This usually worked for me, perhaps will for you. too.

Share this post


Link to post

I had this kind of problem.  It is caused by Windows File Explorer having a cache of icons and not updating the cache.  I have checked my icons in the exe with PE Explorer and tried another file manager called Explorer++ and this confirms where the problem is.

Share this post


Link to post

Got here cos of the same issue - this is really annoying 🙂
Solution - paste this into Windows Explorer address bar

%userprofile%\AppData\Local\Microsoft\Windows\Explorer 

Delete iconcache*

Reboot

 

Fixed

  • Like 1

Share this post


Link to post
On 10/19/2022 at 8:18 AM, peardox said:

Got here cos of the same issue - this is really annoying 🙂
Solution - paste this into Windows Explorer address bar

Me too: Got here because of the same issue - and also was really annoyed by this too !

Many thanks to @peardox

Share this post


Link to post

I used to be able to reset the cache without a reboot with:

ie4uinit.exe -ClearIconCache

or

ie4uinit.exe -show

but I haven't had much success with those methods lately.

 

It definitely is possible to clear the cache without a reboot or killing explorer but it seems Microsoft doesn't want to make it easy for us.
See: SHChangeNotify

Share this post


Link to post

SHChangeNotify got me thinking...

 

Assuming a call to SHChangeNotify(SHCNE_ASSOCCHANGED) is all that is needed to rebuild the cache, is there something in Windows that we know makes that call? A quick search of "the source" gave the answer: The assoc command of the Windows shell; All it does is write an entry to the registry and then make the SHChangeNotify call.

 

assoc .foobar=text

Voila!

 

If you want to remove the file association entry again then it's just:

assoc .foobar=

 

Admin privs required, btw.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×