Created with my new tool. Look at the ImageFromEmbedded method below.
'GDIPlus Architect Component Class Output
Public Class Untitled1
Inherits System.ComponentModel.Component
Private Image1Rectangle As System.Drawing.RectangleF = New
System.Drawing.RectangleF(41, 84, 338, 410)
Protected Image1 As System.Drawing.Bitmap
Public Sub New()
MyBase.New
Me.InitializeGraphics
End Sub
Private Sub InitializeGraphics()
Me.Image1 = Me.ImageFromEmbedded("MynameSpace.akeef.jpg")
End Sub
Public Overridable Sub RenderGraphics(ByVal g As
System.Drawing.Graphics)
g.DrawImage(Me.Image1, Me.Image1Rectangle)
End Sub
'Required to dispose of created resources
Private Sub DisposeGraphics()
Me.Image1.Dispose
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
Me.DisposeGraphics
End If
End Sub
Private Function ImageFromEmbedded(ByVal embeddedPath As String) As
System.Drawing.Bitmap
Dim imageStream As System.IO.Stream =
System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(em
beddedPath)
Dim img As System.Drawing.Bitmap = New
System.Drawing.Bitmap(imageStream)
Return img
End Function
End Class