views:

119

answers:

1

This is generated code on a winform app's InitializeComponent() implementation (from the code-behind *.Designer.cs file).

This code works on Vista/7, but on XP it blows up at runtime.

I have a custom Icon added to the form. It was initially a png file. Suspecting that XP couldn't handle that format (the inner exception is something about serialization) I changed it to an ico file. Same result.

What gives?

A: 

I had added the icon just by pointing it to the ico file, without adding an embedded resource file. I did that, and now it works. Odd. Still would like to know why.

dviljoen