I have created a folder in the resources folder (Properties.Resources). How can I use an image from there?
I have created a folder in the resources folder (Properties.Resources). How can I use
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Usually when adding a resource, a typesafe wrapper is generated for that resource.
So say if I added an image named “picture”, I could access by:
Hope this helps
edit:
After reading your post again, I think what you are saying is you added a subfolder in your solution folder under your Resources folder.
Where I wouldn’t suggest doing this because it’s much simpler to add a resource such as an image through the resource designer, if you are hellbent on creating a sub folder you would then have to add a line under the root tag of your .resx file that looks something like this…
Where SubDirectory is replaced by the name of the sub folder you created. You should then be able to compile and then use Properties.Resources.picture as I showed above.