View Full Version : 256x256 icons in Delphi 7?
Atak_Snajpera
15th January 2009, 22:28
Is there any component which adds support in Delphi 7 for big Vista icons?
LoRd_MuldeR
15th January 2009, 22:31
Is there any component which adds support in Delphi 7 for big Vista icons?
Do you want to display the 256x256 icon in your application or are you referring the EXE file's icon in Explorer?
Atak_Snajpera
15th January 2009, 22:40
or are you referring the EXE file's icon in Explorer?
Yep. I want nice high quality icons in my app.
LoRd_MuldeR
15th January 2009, 22:41
Yep. I want nice high quality icons in my app.
Add the "big" icon manually to the resources of your EXE file with ResourceHacker...
LoRd_MuldeR
15th January 2009, 23:23
Here is a sample project:
http://www.mediafire.com/file/mizmymnmxom/icon-256x256.7z
I replaced the MAINICON in Project1.res with a 256x256 pixel one. I used the ResoureHacker (http://angusj.com/resourcehacker/) tool to do that.
You find it in the "Icon Group" folder. And you can replace it by choosing "Replace Resource" form the context menu.
And you better choose an ICO file that has different versions for 16x16, 32x32, 48x48 and 256x256.
Atak_Snajpera
16th January 2009, 00:08
There is still something wrong. See screenshots
http://img246.imageshack.us/img246/6055/new1mp7.th.png (http://img246.imageshack.us/my.php?image=new1mp7.png)
http://img48.imageshack.us/img48/6278/new2dv1.th.png (http://img48.imageshack.us/my.php?image=new2dv1.png)
LoRd_MuldeR
16th January 2009, 00:18
It looks like you added several individual ICO files, where each ICO file only contains one size of the picture. This way Explorer will only use the very first ICO file.
What we need here is one single ICO file that contains different version of the picture in different sizes. This way Explorer will automatically choose the suitable version for each size.
It should look like this:
http://img405.imageshack.us/img405/4969/icongroupch7.th.png (http://img405.imageshack.us/img405/4969/icongroupch7.png)
(Note that the preview in ResourHacker looks ugly, as it point-resizes all icon to 32x32. But in Explorer it will look good)
[EDIT]
You can try with that ICO file:
http://www.mediafire.com/file/vynymzuzlj1/Internet.ico
It contains sizes of 16x16, 32x32, 48x48, 64x64, 72x72, 96x96 and 128x128.
Atak_Snajpera
16th January 2009, 00:38
I think you are right. I can create multiple icons in just one file using IconLover.
This weird btw. Even Windows 7 cannot resize 256x256 icon to 48x48 (or lower). Scaling works only above 48x48-medium. Instead of just one 256x256 icon we are forced to add stupid low res versions! I will see what happens if I add only two versions.256x256 and 48x48.
LoRd_MuldeR
16th January 2009, 00:44
Instead of just one 256x256 icon we are forced to add stupid low res versions!
That's how it has been on Windows since the very beginning.
Most EXE files have their main icon as 16x16, 32x32 and 48x48 at least. Often each size is even available in three version: 16, 256 and 16.8M colors.
If you want your app to have a nice icon in Explorer, you'll have to do it that way...
Atak_Snajpera
16th January 2009, 02:03
Ok! Problem solved! :) In fact I need only 3 versions. 256x256 , 48x48 and 16x16. Luckly Iconlover supports Vista packed icons so I was able to reduce size of the biggest icon. For compatibilty with XP I left small icons unpacked. So instead of 247 KB icon size now I have only 47 KB :)
THANKS for help!!!
Also thanks for info about JVcomponents for Delphi. Life is alot easier with those enancements. It also allows me to omit bug in old OpenDialog. Finally using JVOpenDialog I can change default dir directly in code. Old OpenDialog didn't care what I added to code. Location was always the same with added in properties before compiling.
LoRd_MuldeR
16th January 2009, 02:12
Ok! Problem solved! :) In fact I need only 3 versions. 256x256 , 48x48 and 16x16. Luckly Iconlover supports Vista packed icons so I was able to reduce size of the biggest icon. For compatibilty with XP I left small icons unpacked. So instead of 247 KB icon size now I have only 47 KB :)
For XP and older you should also include a 32x32 icon, as that is the size used in "Icons" view. And also in the "Properties" dialog.
If there's no 32x32 icon, the user will see a scaled version of the 16x16 or 48x48 icon. And Explorer does horrible scaling.
Also thanks for info about JVcomponents for Delphi. Life is alot easier with those enancements.
Without the JVCL components Delphi is only half of the fun :)
I even wrote my own wrappers for the Windows standard dialogs (Save/Open dialog, Select Directory dialog), before I came across JVCL...
Atak_Snajpera
16th January 2009, 02:31
I think I found a bug in Windows 7. Take a look
http://img83.imageshack.us/img83/1553/new1kp6.th.png (http://img83.imageshack.us/my.php?image=new1kp6.png)
RipBot264_Original.exe contains default manifest added by Delphi
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="DelphiApplication"
version="1.0.0.0"
processorArchitecture="*"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
</dependentAssembly>
</dependency>
</assembly>
RipBot264.exe contains modified manifest by VistaUACMakerConsole.exe for UAC support (it will ask user for administrator privileges)
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" processorArchitecture="*" version="1.0.0.0" name="RipBot264.exe"></assemblyIdentity>
<description>RipBot264</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" language="*" processorArchitecture="*" publicKeyToken="6595b64144ccf1df"></assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="FALSE"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
LoRd_MuldeR
16th January 2009, 03:01
Seems the "shield" overlay icon triggers the problem. Maybe Windows 7 has some problem with alpha blending for icons ???
Anyway, you should do what a Beta tester is supposed to do: Report the problem back the developers (Microsoft in this case).
BTW: Still wonder why an application software needs to request admin rights through UAC :confused:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.