/ Published in: VB.NET
Use this to extract an image embedded as a resource in your project. Call the function supplying the full path to the resource, for example:
Dim myImage as Bitmap = EmbeddedIcon("MyApplication1.myImage.png")
Where "MyApplication1" is the root namespace for the project.
Dim myImage as Bitmap = EmbeddedIcon("MyApplication1.myImage.png")
Where "MyApplication1" is the root namespace for the project.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Imports System.Reflection.Assembly 'returns an embedded resource image by name Public Function EmbeddedImage(ByVal Name As String) As Bitmap Return New Bitmap(GetExecutingAssembly.GetManifestResourceStream(Name)) End Function