Very urgent!! need help fixing this error

G

Guest

Hello

Despite all the advise i have recieved from everyone on this group i still cannot fix this error. I am fast approachin my deadline so i need to fix this asap :blush:

I get the error whenever i try to open the a for

My coding falls over on this line....

Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Bitmap

Infact even when i comment out this line it falls over on the next line that refernences an image
I only seem to have this problem with all the images on this specific form. All the other forms in my application work fine

Here is the error i am getting. does anyone know how to fix??....

An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dl

Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "frmRes.resources" was correctly embedded or linked into assembly "MyProj"
baseName: frmRes locationInfo: MyProj.frmRes resource file name: frmRes.resources assembly: MyProj, Version=1.0.1550.16863, Culture=neutral, PublicKeyToken=nul

I got some advise off someone previously. Here is what they advised me to do...
"Make sure that the resource you're referencing (button2.image) is set as an
embedded resource in your solution

i was told to do this by clicking on the properties tab of the image in question, then changing the Build Action property to Embedded Resource

The problem is that i when i click on button2 (which has the image in it) i cannot see Build Action in the list of properties!!!

Can anyone tell me how i can fix this

Any help is appreciate
 
C

Charles Law

Hi Varun

Is this a Windows Form? If so, make sure that the form class is the first in
the file. For example, if you have an enum, structure or another class
defined before this class in the file, move it to the end, so that the form
is declared first.

HTH

Charles


Varun said:
Hello,

Despite all the advise i have recieved from everyone on this group i still
cannot fix this error. I am fast approachin my deadline so i need to fix
this asap :blush:(
I get the error whenever i try to open the a form

My coding falls over on this line.....

Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Bitmap)

Infact even when i comment out this line it falls over on the next line that refernences an image.
I only seem to have this problem with all the images on this specific
form. All the other forms in my application work fine.
Here is the error i am getting. does anyone know how to fix??.....

An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll
Additional information: Could not find any resources appropriate for the
specified culture (or the neutral culture) in the given assembly. Make sure
"frmRes.resources" was correctly embedded or linked into assembly "MyProj".
baseName: frmRes locationInfo: MyProj.frmRes resource file name:
frmRes.resources assembly: MyProj, Version=1.0.1550.16863, Culture=neutral,
PublicKeyToken=null
I got some advise off someone previously. Here is what they advised me to do....
"Make sure that the resource you're referencing (button2.image) is set as an
embedded resource in your solution"

i was told to do this by clicking on the properties tab of the image in
question, then changing the Build Action property to Embedded Resource.
The problem is that i when i click on button2 (which has the image in it)
i cannot see Build Action in the list of properties!!!
 

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

Top