pmbAustin pmbAustin -4 years ago 72
C# Question

Windows 7 icon sizing problems

I'm trying to create an application icon. I took a bunch of created *.ico files (one for each size) and combined them into a single *.ico file. I can see them all fine. I have 16x16, 32x32, 48x48, 64x64, and 128x128 icons (all 32bit w/ transparency).

However, when I build my app (a standard Windows Forms app written in C#) and look at the icon in Windows explorer, it looks fine at the first few sizes (up to 48x48 I think.. "Medium"), but if I use the "Large" or "Extra Large" display modes in Windows Explorer, I just see the 48x48 (I think) icon in an ever larger box.

How can I get Windows Explorer to recognize the larger icons? What am I doing wrong? Has anyone seen this issue before, and point me in the correct direction? I'm assuming there's a problem with the way the *.ico file is built, or the formats... but I can't find any hints anywhere.

Answer Source

As far as I understand it, once you get above a certain size (and it may well be 48x48), Explorer will go looking for a 256x256 icon, and scale it to the desired size.

128x128 is not a standard icon size, and Explorer may not bother looking for it. You can show icons at up to 256x256 in Explorer ("Extra Large icons"), though you can do sizes in between. If you size your icons to, say, 192x192, then it's going to look better to take a large image and scale it down, rather than to take a small image and scale it up -- so you're better off adding a 256x256 image anyway, rather than a 128x128.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download