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?
+1
A:
One option would be to expose the images as readonly properties of your custom control classes.
Jrud
2009-11-04 20:17:00
since i am using vb.net 2005 this seems like the best way...THANKS!!!
spo
2009-11-04 21:49:13
+2
A:
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
2009-11-04 20:37:32
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
2009-11-04 21:02:56
I'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
2009-11-04 21:16:17