9

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.

Dan Kelly
  • 2,634
  • 5
  • 41
  • 61
  • 2
    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 May 31 '12 at 16:43
  • 4
    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 Jun 01 '12 at 00:36
  • Warren can you add that as an answer so I can respond to it? – Dan Kelly Jun 01 '12 at 08:04
  • Sertac - I'm talking 256*256 - the .ico I've selected in the IDE has the full range of sizes in it. The size is an issue in case the user tries to select some of the larger sizes in explorer. – Dan Kelly Jun 01 '12 at 08:06
  • 1
    @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](http://qc.embarcadero.com/wc/qcmain.aspx?d=73885), one of the D2010 defects that is fixed is *"Vista compatible icons (256×256) aren’t supported*". – Sertac Akyuz Jun 01 '12 at 10:20
  • 3
    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 Jun 01 '12 at 12:29

1 Answers1

1

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

Gogowitsch
  • 1,181
  • 1
  • 11
  • 32
  • you can test whether this is the issue by renaming the exe or copying the exe to a new machine. rebuilding the cache should fix it though. – Jessica Brown Jun 20 '14 at 14:30