Can't use resource - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Can't use resource

outlawhackeroutlawhacker Posts: 29Member
Hi!

I've have made a resource file named "Images.resources". Now I can't get my images from it...:/

private System.Resources.ResourceManager rm = new System.Resources.ResourceManager("Images", System.Reflection.Assembly.GetExecutingAssembly());

Bitmap pic;
pic = (Bitmap) rm.GetObject("111.gif");

I get this error message:

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 "Images.resources" was correctly embedded or linked into assembly "Form1".
baseName: Images locationInfo: resource file name: Images.resources assembly: Form1, Version=1.0.1285.40402, Culture=neutral, PublicKeyToken=null

??? What could be wrong???

thanks

Comments

  • outlawhackeroutlawhacker Posts: 29Member

    :
    : private System.Resources.ResourceManager rm = new System.Resources.ResourceManager("Images", System.Reflection.Assembly.GetExecutingAssembly());
    :

    got it!

    It should be: ...ResourceManager("Form1.Images",....
Sign In or Register to comment.