Go back How to compile Windows Vista icons|Compiling compressed Windows Vista icons page.

user iconAnonymous on December 21st 2006 0

Delphi up to Version 2006 does not Handle Vista icons natively. But you can use a third party Tool ResEd for Delphi available at www.theunknownones.net to add a Vista icon as application icon.

user iconAnonymous on March 1st 2007 0

ReplaceVistaIcon doesn't work for me. The EXE (compiled with Delphi 2006) increases it's size about 700 KB, although the ico-file is only about 100 KB. But after that the exe file is corrupt.

user iconVlasta on March 1st 2007 0

If you send the .exe to info@rw-designer.com, I will check what has happened.

user iconAnonymous on March 5th 2007 0

The icon gets replaced in the EXE, but the EXE view still doesn't scale in Vista like the icon itself does. I get the same result whether I use this tool or simply import a Vista icon into the EXE file in Visual Studio. All sizes are there 16x16 up to 256x256, so it looks Ok in VS, but not in the Vista explorer view.

user iconVlasta on March 5th 2007 0

Make sure, you icon has all the formats (including 8-bits and 4-bits color depths) and the formats are in correct order (large images first).

user iconAnonymous on April 23rd 2007 0

I don't want to register to post this, but my name is Rick Yorgason, I work at LDA Games, and my email address is rick@firefang.com or rick@ldagames.com (it shouldn't be difficult to ascertain that I'm a real person with all that info!)

What I did to bypass this problem is to download the latest beta of the express version of Orcas (aka Visual Studio 9), and copy rcdll.dll from the "Microsoft Visual Studio 9.0/VC/bin" directory to "Microsoft Visual Studio 8/VC/bin". Everything seems to be working so far.

user iconAnonymous on May 12th 2007 0

Hi, my name is Martin (info2007 at hypermake dot de) and your tool seems to work fine with different EXE files. But if I create a Vista icon with the IcoFX program and turn compression on (this is the default value), the icon of the modified EXE program is not shown. The size of the EXE files increases about 200 kB without compression and only 10 kB with compression, so compression would be nice. Any idea?

user iconVlasta on May 13th 2007 0

Make sure that your icon contains all the necessary image formats and they are in correct order - compare your icon with the one displayed above (you can download it by clicking the link below the image).

user iconMartin on May 13th 2007 0

that's me again. I continued my trials with your sample icon (yes, I really had not created the classic smaller icons with 48x48, 32x32 and 16x16 in the new ico file). Now the icons are shown correctly on 2000/XP, but Vista grabs my very old 32x32 icon which is still part of the exe file. I repeated the trial with the original Win2000 Notepad.exe file and all works fine. So it seems that there are problems with my exe file created with old win32 Borland C 5 which creates pure and simple win32 binaries. Any hints? (The exe file is 4allCalc calculator, see www.hypermake.com) I get the same problem with the exe binaries of another programming environment (www.wdsibyl.org), a crossplatform Delphi clone.

user iconVlasta on May 13th 2007 0

As long as the binary is 32-bit, there should be no problems regardless the used compiler. I looked at your exe and there are 2 icons, one with numeric and one with string ID. To be on the safe side, I would only use numeric IDs and the main application icons should be the first icon in the exe and have lowest ID. Maybe Vista sorts the icons differently.

user iconMartin on May 14th 2007 0

It seems that there is indeed no difference between the EXE files. After deleting all Icons in my EXE, Vista still did show the old icon, even after a folder refresh. I am now sure that this is a bug in Vista! To see the new icon, I had to copy the file in the command line to a new name, so the Desktop thinks that it is a new file and does not show the old icon from the internal cache. Now the new icon is shown, thanks a lot for this great tool!

user iconAnonymous on June 9th 2007 0

hi i juz wanna now how to actually use this thing, i am still a newbie to it

user iconAnonymous on June 9th 2007 0

is there any thing dat teach me how to use this thing from the very very early on ?? need deep help, thx

user iconVlasta on June 9th 2007 0

Well, this article is for software developers trying to solve a certain problem. If you are a developer, you should not have any problems using this tool. Otherwise the question is what you are trying to accomplish...

user iconAnonymous on July 1st 2007 0

So I did the rcdll.dll trick and that didn't work. Could there be a difference since Visual Studio 8 is running on my XP system and not on Vista? I also have two icons, embedded in EXE so thus a challenge...

user iconVlasta on July 2nd 2007 0

Do you have a SP1 for VS2005 installed? That enables compilation of vista icons, but not usage from IDE. That's what the rcdll.dll trick(?) is for.

user iconAnonymous on February 17th 2008 0

what about the source code?

user iconAnonymous on February 17th 2008 0

what about the license?

user iconVlasta on February 18th 2008 0

it can be used for free and source code is on codeproject.com

user iconAnonymous on October 19th 2008 0

In Delphi 2009 you are able to chose which resource compiler you want to use. If you select the "Microsoft resource compiler" from Delphi, you will be able to compile Vista icons in your Delphi app without any extra work.

user iconAnonymous on February 10th 2009 0

Install the latest Microsoft Windows SDK - http://www.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en
then run VCIntegrate. This should fix the Vista compilation problem

user iconAnonymous on May 6th 2009 0

This tool (ReplaceVistaIcon) works fine, but it does break our debugging process. Since our EXEs are created with VB6 (don't ask), we have to use ReplaceVistaIcon by hand. Then the EXE's modification date doesn't match the PDB's modification date, and the debugger won't recognize the symbols. An option to preserve the modification date would be useful to us...

user iconVlasta on May 6th 2009 0

I have put the source code for this tool to CodeProject web site. It should not be hard to add the date preservation bits. (Or can you just debug without the icons?)

user iconAnonymous on January 5th 2010 0

Your program puts in padding stuff like "PADDINGXX". I think it is much smarter to pad with zeroes (will compress better anyway).

As for Delphi 2009, Delphi 2010, C Builder 2009, C Builder 2010 - the built in resource compiler can build programs with Borland Resource Compiler (brcc32.exe) and with Windows SDK Resource Compiler they both work but ONLY for uncompressed icons.

Vista 256x256 icon features PNG compression and Delphi/Borland compiler seems to have issues with PNG compressed icons. So if you use tools like IcoFX, RealWorld Icon Editor or IconWorkshop to create your icons, you must remember to turn of PNG compression support for 256x256 icons otherwise you will be able to compile them into your application but they will not be shown properly on Vista / Win7.

Having uncompressed icon will increase your application size of course, but if you are packing it with some compressor later (zip, rar, nsis installer...) it will actually compress better so it will be larger file when installed but smaller when in installer archive if you use uncompressed icon (although, this is not a rule, PNG compression can sometimes make things smaller).

user iconTelecetera on January 15th 2010 0

Thanks to all contributors, we should have solved our problem, but haven't.

We use D2007 on W7 64-bit. We grabbed a working, resizable icon from the desktop using IcoFx, switch off PNG compression and saved it. Added it as the only icon to a simple Delphi app using Project\Options\Application\Icon, then ran ReplaceVistaIcon ourapp.exe savedicon.ico, and could see the resultant increase in size. Noting comments about replacing versus adding, we also tried adding 0 and 1 as a third parameter.

No dice, any ideas?

user iconVlasta on January 15th 2010 0

Caching in Explorer? Try making a copy of the exe after running the tool...

user iconAnonymous on April 28th 2010 0

Can you provide a link to the source code? I can't find it in codeproject.

user iconAnonymous on October 14th 2010 0

I use delphi 2007.. and have windows 7 x64... I have the icons working like this..

I use icoFX to create a multi layer icon.. eg the different size icons are in one .ico file.. 256x256, 48x48, 32x32 and 16x16. Save as 159.ico.

Create a new resource script file (resources\setup.rc) and add:
#define ICON_1 159
ICON_1 ICON "159.ico"

Compile script with rc.exe

Comment out the default resource file (.RES) from your delphi project file (PROJECT/VIEW SOURCE), and add your new one created from the .rc file that has the icon info in it.

//{$R *.res}
{$R .\resources\setup.res}

This stops delphi from using the default icon definded in the project.
Then add this line after Application.Initialiation;

Application.Icon.Handle := LoadIcon( hInstance, '#159' );

Windows Vista and 7 can now display what ever icon it wants.

Hope this helps..

user iconAnonymous on November 18th 2010 0

Is there any information available on the return codes for replaceVistaIcon?

user iconVlasta on November 18th 2010 0

the usual - 0=success, 1=failure

user iconAnonymous on March 10th 2013 0

Thank s for the tool I still have some tools built with delphi 6. I can now solve my icon problem on Win Vista/7/8 instead replace manually my app icon after each build 😊 :-)

user iconAnonymous on May 20th 2013 0

does it work on windows 7?

user iconVlasta on May 20th 2013 0

yes

user iconAnonymous on May 20th 2013 0

thank you very much sir

user iconAnonymous on January 10th 2016 0

Hi! With MinGW apps targeting 32 bit ReplaceVistaIcon break debug information (application that is processed with ReplaceVistaIcon crashes gdb).

user iconAnonymous on July 17th 2020 0

C:-( HMMMMMMMMMMMM I DON'T NO

Go back How to compile Windows Vista icons|Compiling compressed Windows Vista icons page.