Image Target

ADO DOT NET

Centurion
Joined
Dec 20, 2006
Messages
160
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.
 
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.
 
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.
 
Back
Top