Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetManifestResourceStream(String)???

1 view
Skip to first unread message

Darryn Ross

unread,
Aug 16, 2004, 12:07:50 AM8/16/04
to
Hi,

I am trying to use GetManifestResourceStream and i keep getting a NULL
exception error?? i cannot understand why?

private Bitmap _buttonFace;
.

.

.

my code is as follows....

System.IO.Stream strm =
this.GetType().Assembly.GetManifestResourceStream("FWNGL.buttonface.bmp");

_buttonFace = new Bitmap(strm);

Regards

Darryn


Shell

unread,
Aug 16, 2004, 12:13:25 AM8/16/04
to
Darryn,

Try this:

string []resourceNames =
this.GetType().Assembly.GetManifestResourceNames();

Go through that list and verify that the resource you want is listed
there. You'll have to use the exact name that's shown there.

Darryn Ross

unread,
Aug 16, 2004, 12:40:21 AM8/16/04
to
Hi Shell,

Thanks, I did what you said and i found that my bitmap was missing! but i
have added the bitmap into the project?? why isn't it picking it up?

Regards

Darryn

"Shell" <shel...@yahoo.com> wrote in message
news:cfpc95$u...@odak26.prod.google.com...

Robert Misiak

unread,
Aug 16, 2004, 12:52:28 AM8/16/04
to
Select the file in the Solution Explorer, and look in the Properties window;
"Build Action" should be set to "Embedded Resource."

Robert


"Darryn Ross" <dar...@datawave.com.au> wrote in message
news:%23dFOFq0...@TK2MSFTNGP11.phx.gbl...

Darryn Ross

unread,
Aug 16, 2004, 1:12:40 AM8/16/04
to
Thanks Robert.. that worked.

"Robert Misiak" <rmi...@users.cutthispartout.sourceforge.net> wrote in
message news:g4XTc.1199$3O3....@newsread2.news.pas.earthlink.net...

0 new messages