title: How do you make an icon that's compatible with Vista/7 and XP?
body: <p>Is there a way to make an icon file that includes a high-res .PNG copy of itself to be used with Windows 7 and Vista, but also includes the old-school .ico format so that it works with XP?</p>
  
  <p>I recently had a <a href="https://stackoverflow.com/questions/5054863/net-4-program-written-compiled-on-windows-7-machine-wont-run-on-xp">problem</a> with a program that I wrote crashing whenever it was run on an XP box that was caused by the app icon being a .PNG. Because Vista and 7 support higher resolution icons that can have transparencies and whatnot I'd like to use that, but I also need the program to run on XP so I need to have it include a .ico as well.</p>
  
  <p>I can think of two solutions to this:</p>
  
  <ol>
  <li><p>Set the program so that it detects the operating system and it assigns the appropriate icon accordingly</p></li>
  <li><p>Perhaps there is a way to compile an icon file so that it includes both the .png format and Win7/Vista automatically uses that when it's available, and Windows XP just loads the .ico</p></li>
  </ol>
  
  <p>Hopefully I've made that clear enough.. :)</p>
  
  <ul>
  <li>Development Environment: Visual Studio 2010</li>
  <li>Operating System: Windows 7 Ultimate</li>
  <li>Language: C# .NET 4.0</li>
  </ul>