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.

6
  • 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? Commented May 31, 2012 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
    Commented Jun 1, 2012 at 0:36
  • Warren can you add that as an answer so I can respond to it?
    – Dan Kelly
    Commented Jun 1, 2012 at 8:04
  • 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, one of the D2010 defects that is fixed is "Vista compatible icons (256×256) aren’t supported". Commented Jun 1, 2012 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. Commented Jun 1, 2012 at 12:29

1 Answer 1

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

1
  • 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. Commented Jun 20, 2014 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.