1

Im creating a c# application using visual studio 2010 on a windows 7 machine. I added an icon image to to my form and the icon shows up fine on all windows 7 machines I run the application on. But when I try and run it on an XP machine it doesn't allow the program to run or display the image on the desktop. Any suggestions on this?

jgig
  • 13
  • 4
  • Suggestion: More info. Show us how it is loaded. Tell us if there is an error message and, if there is, what it says. Really, more info. – Ed S. Dec 28 '11 at 00:00

2 Answers2

2

Your icon is sized improperly for Windows XP. Windows XP can't handle large icon format by default (48x48 is default max I think in XP). Windows Vista and 7 handle 256x256. It could also simply be malformed. Try removing the icon and verify that it corrects the problem. You may also want to try to reformat your icon file (with software like Icon Workshop).

UnhandledExcepSean
  • 12,504
  • 2
  • 35
  • 51
  • 3
    If you create the icon properly, XP is supposed to ignore the 256x256 icon. But the program saving the icon does need to know how to do the right dance to make that happen. – Joe White Dec 28 '11 at 00:11
  • @JoeWhite, the problem is very likely that the 256x256 image in the .ico file is compressed. Windows XP can't handle that. See my answer at (http://stackoverflow.com/questions/12385143/wpf-application-shows-image-format-is-unrecognized/19984844#19984844) for more info. – cplotts Nov 14 '13 at 18:02
0

If the problem is related to icon size, just use this site to create a new .ico file.

Now there could be something else going on, i had this issue on one of my apps. I changed the form icon directly on its property pane and it wasnt displaying well on other OS's. So what i did was, i added the icon on the application properties.

Go to the 2nd icon on the solution explorer right click it and select properties. A new window appears and on the Application tab you have the Resources group, where you can browse for the desired icon.

Try that out and see if it gets fixed.

Fernando Silva
  • 353
  • 4
  • 20