Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I want to import a local resource (image file) to my project and use it via code.

I know this way I can load image from file:

System.Drawing.Image.FromFile("d:\Image2.png")

but don't know how to obtain it from resource?

thanks.

Posted

I don't want the picture to be appear in solution explorer > resources section.

It should be accessed this way:

CType(resources.GetObject("AddFileButtonX.Image"), System.Drawing.Image)

 

I don't know how.

  • Administrators
Posted

I've got to ask - why don't you want to use the built in support for resource files? The strongly typed wrapper VS generates make using resources far easier than doing all the code yourself...

 

If you do want to do all this outside of VS then you could use resgen.exe to manage string resources and al.exe to both embed images themselves and the output from resgen into a resource only .dll - it is a lot more work though.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...