Hi all,
I am getting a NULL exception from the following code....
Assembly asm = Assembly.GetExecutingAssembly();
Bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream("bg.gif"));
Is it because I am putting a GIF into a Bitmap If so, how do I extract a GIF from an embedded resource
Tryst

Accessing GIF from Embedded Resource
Phil Robert
embedded resources as I said AFAIK, when you embed it, it starts with the namespace.filename.ext
even if your filename is "test.bmp", it will embed it as namespace.test.bmp. At least you have it sorted now :-)
CodePfo
huh
generally AFAIK or from my experience, the embedded resource is called by the namespace (product name) + "." + the filename. Does this not work at all
barkingdog
I just tested it, and it seems to use the default Namespace value you specify in the Solution properties, and not the Product Name.
Mantorok
Tryst
Docpro777
it should be this...try this:
Assembly asm = Assembly.GetExecutingAssembly();
Bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream(Application.ProductName + ".bg.gif"));
also, the filenames are case sensitive
kperson