Revision: 12315
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 10, 2009 10:17 by chavcho
Initial Code
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
Initial URL
Initial Description
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.
Initial Title
Extract an Image Embedded as a Resource
Initial Tags
image
Initial Language
VB.NET