Return to Snippet

Revision: 12314
at March 10, 2009 10:14 by chavcho


Initial Code
Imports System.Reflection.Assembly

'returns an embedded resource icon by name
 Public Function EmbeddedIcon(ByVal Name As String) As Icon
    Return New Icon(GetExecutingAssembly.GetManifestResourceStream(Name))
 End Function

Initial URL


Initial Description
Use this to extract an icon embedded as a resource in your project. Call the function supplying the full path to the resource, for example:

Dim myIcon as Icon = EmbeddedIcon("MyApplication1.myicon.ico")

Where "MyApplication1" is the root namespace for the project.

Initial Title
Extract an Icon Embedded as a Resource

Initial Tags


Initial Language
VB.NET