471,618 Members | 1,070 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Image Resourses using VS2005 and .resx file

Hello
I am trying to include some images in my applications resources.
1. Create New Item (Resource File) for my Project
2. Set the name to NetRes.resx
3. Add an image , set the name to Error (it is a .png file)
4 . Put this code
ResourceManager rm = new ResourceManager("NetRes", this.GetType().Assembly);

pictureBox1.Image = (Image)rm.GetObject("Error");

5. I get an error message to check my satellite assemlies.

What am I doing wrong here? Any help ?

Regards.

Mike
Feb 5 '06 #1
2 2137
Anyone ?

Michael Poirazi wrote:
Hello
I am trying to include some images in my applications resources.
1. Create New Item (Resource File) for my Project
2. Set the name to NetRes.resx
3. Add an image , set the name to Error (it is a .png file)
4 . Put this code
ResourceManager rm = new ResourceManager("NetRes",
this.GetType().Assembly);

pictureBox1.Image = (Image)rm.GetObject("Error");

5. I get an error message to check my satellite assemlies.

What am I doing wrong here? Any help ?

Regards.

Mike


--

Feb 7 '06 #2

Michael Poirazi wrote:
Hello
I am trying to include some images in my applications resources.
1. Create New Item (Resource File) for my Project
2. Set the name to NetRes.resx
3. Add an image , set the name to Error (it is a .png file)
4 . Put this code
ResourceManager rm = new ResourceManager("NetRes", this.GetType().Assembly);

pictureBox1.Image = (Image)rm.GetObject("Error");

5. I get an error message to check my satellite assemlies.

What am I doing wrong here? Any help ?
You need to generate the resource file (.resource) first.

In a DOS box, set the path to include the VC# directory (usually
Program Files\Microsoft Visual Studio .NET 2003\VC#) and type:

resgen NetRes.resx NetRes.resources

Copy the .resources file to whereever the program is, and run it.

Matt

Regards.

Mike


Feb 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Matthew Wieder | last post: by
1 post views Thread by D. Yates | last post: by
3 posts views Thread by Steve | last post: by
2 posts views Thread by Carlo \(MCP only\) | last post: by
3 posts views Thread by timnels | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

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.