Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb.net: Get to resources of a referenced project

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?

like image 416
spo Avatar asked Nov 26 '25 00:11

spo


2 Answers

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
like image 178
Meta-Knight Avatar answered Nov 28 '25 15:11

Meta-Knight


One option would be to expose the images as readonly properties of your custom control classes.

like image 33
Jrud Avatar answered Nov 28 '25 16:11

Jrud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!