Loading embedded resource on Windows 7
Posted
by Flack
on Stack Overflow
See other posts from Stack Overflow
or by Flack
Published on 2010-06-13T19:12:40Z
Indexed on
2010/06/13
20:22 UTC
Read the original article
Hit count: 303
Hello,
I have an app that works just fine on my WinXP machine. However, when I try running it on my Win7 machine, it fails whenever it tries to load an embedded resource. The resources are all there (I can see them using Reflector).
The lines that fail are all of the form:
Splash.Image = new Bitmap(typeof(ContainerForm).Assembly.GetManifestResourceStream("SplashTest.Resources.Logo.gif"));
And they all fail with the same exception:
Exception='System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Stream stream)
I don't understand why this is not working on my Win7 machine but does on my usual WinXP dev machine.
Any ideas?
© Stack Overflow or respective owner