GetManifestResourceStream("fullbuttonface.bmp") not working

J

Jonathan Crawford

Hi

I downloaded a sample from here
http://64.78.52.104/FAQ/WinForms/default.asp#44
5.57 How do I display a column of buttons such as pushbuttons or combobox
buttons?

I can run the project ok and it works as intended but can't get
the functionality to work with my project.

I created a new project, imported all the objects from the sample in, set
the bit maps to be "Embeded resources"
I have set every namespace to be the same


However the code fails to pick up the bitmap

Dim strm As System.IO.Stream =
Me.GetType().Assembly.GetManifestResourceStream("fullbuttonface.bmp")
_buttonFace = New Bitmap(strm)


The error code is null is not valid value for a stream

I have sadly spent a whole day on this and don't know
where to go next.

I am obviously missing somethign simple

Ant adice would be appreciated

Jonathan












--

===============
Jonathan Crawford
01273 440018
07799 068570
fax 01273 380221
(e-mail address removed)
===============
 
B

Brian Henry

you need to use the namespace before the filename

if your rootnamespace is WindowsApplicatioin1 then it would be
WindowsApplication1.fullbuttonface.bmp

try that
 
J

Jonathan Crawford

Thank you. It was that simple.
You don't know how much pain yuou took away

jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top