tags:

views:

247

answers:

2

I have an application that uses 25x25 png image for application icon on Windows xp this fits perfectly on the taskbar however I installed Windows 7 on a virtual machine and taskbar on windows 7 resizes the icon, it becomes a big blur. What type of icon should i use the on the task bar? Forgive my ignorance, if this is a stupid question but i am a linux guy...

+2  A: 

Windows obtains several different icon resolutions from the executable. For the taskbar, it uses the either the default 16x16 pixel icon or the 32x32 pixel icon in the screen color depth.

An example from Java SWT to set the application icon:

String[] icons = { "icon16.png", "icon32.png", "icon48.png" };
shell.setImages(getImages(icons));

Windows 7 then obtains the first icon from the image set to display in the taskbar (when small icons are enabled) or the second icon from the image set (when small icons are disabled).

Paul Lammertsma
executable has a .ico with all sizes from 512 to 16 pixels but it is not picking them up. am i overriding this behavior by settings the application icon inside the application?
Hamza Yerlikaya
I can't say for sure without seeing the source code, but the symptoms point to "yes". Try dynamically providing only one 16x16 icon. Then try switching the taskbar option to "show small icons" under taskbar properties.
Paul Lammertsma
A: 

I assume Windows 7 resizes all types of icons to fit into the taskbar. You could use Gimp or something similar, though, to create a bigger icon that fits out of the 25x25 icon, simply by adding a transparent border around it. PNG should work there.

Johannes