ADO DOT NET Posted December 28, 2007 Posted December 28, 2007 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. Quote
ADO DOT NET Posted December 29, 2007 Author Posted December 29, 2007 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. Quote
Administrators PlausiblyDamp Posted December 29, 2007 Administrators Posted December 29, 2007 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. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.