0

How do get a dll's resources
By resources i mean the stuff that you can put in like Images,files,icons ect.
How to you call the resources:)

2
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by GeekByChoiCe
0

What i need - Let's say i have button and i want to get a image from My dll Example Button.Image = Dll.Resources.globe
Do you think its possible
- please reply:)

Edited by VB 2012: n/a

0

Yes it is possible...
You have to set the images in your dll to "Embedded Resource"
I will attach an example app. Just build the whole solution, run the testApp and click the button.

in your app you can get the resources like in the example below...

Dim img As Image = Image.FromStream(System.Reflection.Assembly.LoadFrom("externalResources.dll").GetManifestResourceStream("externalResources.de.gif"))
PictureBox1.Image = img
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.