ImageList and MissingManifestResourceException

Z

Zanna

Hi,

I got a problem that I don't understand.

I placed an ImageList on my form, I added 4 icons to it (32*32) and all was
fine.
When I run the app it goes into exception (MissingManifestResourceException)
at the following line generated by VisualStudio:

this.ilIcons.Images.Add(((System.Drawing.Image)(resources.GetObject("resourc
e"))));

What was wrong?

What is that exception?
How can I see the resources of my app?

Thanks!
 
P

Peter Foot [MVP]

You can use ildasm tool shipped with Visual Studio to examine the resource
manifest in your assembly. By default you'll find it here:-
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin

One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect. You can also use
Assembly.GetManifestResourceNames from code to determine the names of all
the included resources in your assembly.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Z

Zanna

Peter Foot said:
One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect.

I think you're right: I examined the resources and them have the old form
name :(

But is it possible to change them to the right name?
It would be absurd if I had to refactor all the form...

Also I don't understand why at design time all is ok.

Thanks again
 
Z

Zanna

Peter Foot said:
One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect.

Well... can I know what damned names should have the resources?

I can't get images work! :(

Possible? I add an image ad design and at runtime it give me the
MissingManifestResourceException...


Thanks
 

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