Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use VISTA sized icons when you use 'Load icon' in Delphi 7?

I cannot load icons which contain Vista sized icons when using the 'Load icon' in the application tab of Delphi 7.

Does someone knows how to display icons bigger than 48x48 in Vista and Windows 7 using an application developed in Delphi 7?

like image 715
Edelcom Avatar asked Jan 22 '23 21:01

Edelcom


2 Answers

A icon is a collection of images. Starting with Windows Vista support for PNG compressed images has been introduced, and in fact when you say "Vista icon" the graphics designer takes it as a icon containing the PNG image (among other sizes).

Solution (1): Remove the 256x256 PNG image, the 128x128 alpha-channel images are quite enough and they do work with Delphi 7. And don't feel too bad about it, Visual Studio had (has???) lots of problems with PNG compressed images itself!

Solution (2): Use a Delphi-7 compatible icon for the build and after Delphi gives you the Exe replace the icon with the one you want, using some tool (ResourceHacker is free and works fine for me, it can be controlled from the command-line so I can use it in my automated builds)

like image 99
Cosmin Prund Avatar answered Jan 24 '23 10:01

Cosmin Prund


It is VERY EASY to add high resolution icons in your Delphi 7 exe: http://thesunstroke.blogspot.com/2010/10/how-to-add-high-resolution-icons-to.html

like image 26
Server Overflow Avatar answered Jan 24 '23 10:01

Server Overflow