Suppose I have this:
<Window stuff Icon="Resources\myicon.ico">
If I run the program on Windows 7, it's fine. If I run it on Windows XP SP2, it crashes. Removing the Icon property, it works fine on Windows XP, but then it doesn't have my myicon on the Windows 7 taskbar or on the Window.
Also, setting the application icon on the VS project menu doesn't work for W7, but works for XP. In summary:
<Icon>
= broken XP, ok W7
No <Icon>
= ok XP, ugly W7
VS project icon option = doesn't work for W7, ok XP
For the record, I created icons for 16x16, 22x22, etc up till 256x256 for 32, 24 and 8 bits. I also used IcoFX auto option of creating the .ico image for Windows XP.
Is there a way around this? Or do I have to choose between an ugly Windows 7(and Vista?) App or no Windows XP app?
XP does not support 256x256 icons. Remove the 256 icon for XP.
It has nothing to do with the resolution, but with the format: Windows XP can't handle PNG compressed icons in an ICO file. Normally only the bigger reolutions are compressed, mostly 256x256.
I used http://iconverticons.com/ to create ICO files and they also compress the 128x128 images using PNG.
To solve this, open your ICO file in Visual Studio and delete all versions of the icon in PNG format. Alternatively you can convert the PNG icons to BMP format with icoFx. Just disable compression in the options dialog and save your icon to a new file.
You can download IcoFx latest free version here: http://www.chip.de/downloads/IcoFX-letzte-Freeware-Version_28266149.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With