I have a project which contains all custom controls and images; we'll call it projectBase. Now I have created a windows forms project (project1) that references projectBase. I need to access the embedded resource (images) of projectBase in project1. Any idea how i can pull this off?
Asked
Active
Viewed 3,347 times
2 Answers
5
In project properties, under Resources, you have the Access Modifier at the top, which you can set as Public. Now you can access resources from the other project like this:
Dim someResource = MyReferencedProject.My.Resources.SomeResource

Meta-Knight
- 17,626
- 1
- 48
- 58
-
this is exactly what i am looking for, but i am having trouble locating the access modifier. All i see is a type filter, add resource, remove resource, and view options at the top. i forgot to mention i am using 2005, could this be the difference? – spo Nov 04 '09 at 21:02
-
1I'm using VS2008... looking at the documentation it seems to be new to 2008 unfortunately. But check out the answer to this question, there are some other ways to do it: http://stackoverflow.com/questions/140937/is-there-a-way-to-make-strongly-typed-resource-files-public-as-opposed-to-intern – Meta-Knight Nov 04 '09 at 21:16
1
One option would be to expose the images as readonly properties of your custom control classes.

Jrud
- 820
- 3
- 7
- 21