VB6 app icon in Windows 7 taskbar is blurred

2019-07-28 02:28发布

I have a VB6 application and one of the Form icon is set as application icon. The problem is that in Windows 7 the icon looks blurred even though the icon contains 16x16, 32x32 and 48x48 sizes.

Is there a way around this problem? It tried the SendMessage(... SETICON... ICON_BIG) but it does not seems to work.

2条回答
太酷不给撩
2楼-- · 2019-07-28 03:08

I don't claim to understand the full heuristics used to choose the icon image to display in various places, but I think what is happening here is that your 48x48 image is being taken and scaled down.

I suspect what happens with a VB6 program on many versions of Windows is that if there is no 16-color 16x16 image then a larger size gets taken and scaled. The reason may simply be due to the order of the images in the ICO resource/file.

If you edit your ICO and add a 16-color version of your 16x16 image your "problem" may disappear.

查看更多
霸刀☆藐视天下
3楼-- · 2019-07-28 03:23

What colour depth are the icons in your ico file?

VB6 (I believe) supports a maximum 8 bit colour depth (256 colours) for icons:-

So if there is no size 48 x 48 icon in 8 bit colour depth it could be using the nearest match and scaling it to 48 x 48

EDIT:

I just tried this using an icon that did not have a 48 x 48 icon at 8 bit depth (but did have 48 x 48 at higher depths) and the icon used in the taskbar was the 32bit icon at 8 bit colour depth.

查看更多
登录 后发表回答