9
votes

We're just adding support for Window 7 to our in-house applications and we're having problems with including support for large icons to the applications.

I've created a .ico file in IcoFX with the default range of icons included, and assigned this to the project in Delphi 2010. However when I run the application the icon displayed is the default (32x32?) icon.

Is the problem that I'm compiling the application on a Windows XP machine rather than on Windows 7?

[Update] I've confirmed that XE2 includes all the icon sizes on compile - certainly when compiling on Windows 7.

1
The taskbar (by default) or alt+tab dialog displays the 32x32 icon. Where do you expect that a larger icon will be displayed when you run the application?Sertac Akyuz
What do you mean by large? 48x48? or 256x256? Just put a second icon (create an RC file with an ICON line, and build+link the resources via {$R ..} directive) into your app, and Windows explorer will find that second icon that has the 256x256 size icon, which will then display on your windows desktop in full size glory. The icon assigned as the default app icon can only go up to 48x48 by design of the Delphi IDE and project manager code.Warren P
Warren can you add that as an answer so I can respond to it?Dan Kelly
@Dan - Ok, the running the application part is confusing, for the explorer view you don't have to run the application. Anyway, I'd suggest trying IDE Fix Pack, one of the D2010 defects that is fixed is "Vista compatible icons (256×256) aren’t supported".Sertac Akyuz
The IDE can't handle those 256px PNG icons. It's the resource compiler that gags on it. I solve the problem by doing it myself. I use the MS resource compiler to create my .res file with the MAINICON and link that.David Heffernan

1 Answers

1
votes

It might by the Windows IconCache database. This is one problem I've run into in similar situations. Some Delphi development machines still show icons from several years back because the IconCache only stores the path, not any hash of the file's content.

Click on this link to find out how to clear the IconCache:
https://www.google.com/search?q=reset+iconcache+windows