开发者

vb.net: Get to resources of a referenced project

开发者 https://www.devze.com 2022-12-10 18:24 出处:网络
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 projectBa开发者_运维百科se.I need to ac

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 projectBa开发者_运维百科se. I need to access the embedded resource (images) of projectBase in project1. Any idea how i can pull this off?


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号