473,480 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GetManifestResourceStream("fullbuttonface.bmp") not working



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("f ullbuttonface.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
jc@jcrawford.co.uk
===============
Nov 21 '05 #1
2 2761
you need to use the namespace before the filename

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

try that
"Jonathan Crawford" <jc@jcrawford.co.uk> wrote in message
news:Oq**************@TK2MSFTNGP09.phx.gbl...


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("f ullbuttonface.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
jc@jcrawford.co.uk
===============

Nov 21 '05 #2
Thank you. It was that simple.
You don't know how much pain yuou took away

jonathan
"Brian Henry" <no****@newsgroups.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
you need to use the namespace before the filename

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

try that
"Jonathan Crawford" <jc@jcrawford.co.uk> wrote in message
news:Oq**************@TK2MSFTNGP09.phx.gbl...


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("f ullbuttonface.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
jc@jcrawford.co.uk
===============


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1785
by: Matt | last post by:
I'm working on a plug-in for an application called DesktopSideBar for Windows. It emulates to some degree the Longhorn sidebar. The SDK for DesktopSideBar supports .NET plug-in development through...
5
1948
by: Richard | last post by:
I added a bitmap file to my project in the Soultion Explorer window. I set the Build Action property on the bitmap file to Embedded Resource. The Project Properties, File Properties help item says...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6750
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.