开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜