B
Brian Henry
If you embedded an icon into a dll, how would you get access to it form
inside the dll and return it to the calling app?
I know how to return it, just I cant figure out how to access the embedded
resource in the dll from the dll (which is an icon) i can though figure out
how to get an embedded resource from inside the exe file... what am i doing
wrong?
'Dim oStream As System.IO.Stream
'Dim oAssembly As System.Reflection.Assembly
'Dim sIcon As String
'Dim oBitmap As Drawing.Bitmap
'sIcon =
System.Reflection.Assembly.GetCallingAssembly().GetName.Name.ToString() &
"ICON49.ICO"
'oAssembly =
System.Reflection.Assembly.LoadFrom(System.Reflection.Assembly.GetCallingAss
embly.ToString)
'oStream = oAssembly.GetManifestResourceStream(sIcon)
'oBitmap = CType(Drawing.Image.FromStream(oStream), Drawing.Bitmap)
'Return sIcon.FromHandle(oBitmap.GetHicon)
even better, how would i get the resource from the dll from the application
exe? i just need to read out some icons.... thanks!
inside the dll and return it to the calling app?
I know how to return it, just I cant figure out how to access the embedded
resource in the dll from the dll (which is an icon) i can though figure out
how to get an embedded resource from inside the exe file... what am i doing
wrong?
'Dim oStream As System.IO.Stream
'Dim oAssembly As System.Reflection.Assembly
'Dim sIcon As String
'Dim oBitmap As Drawing.Bitmap
'sIcon =
System.Reflection.Assembly.GetCallingAssembly().GetName.Name.ToString() &
"ICON49.ICO"
'oAssembly =
System.Reflection.Assembly.LoadFrom(System.Reflection.Assembly.GetCallingAss
embly.ToString)
'oStream = oAssembly.GetManifestResourceStream(sIcon)
'oBitmap = CType(Drawing.Image.FromStream(oStream), Drawing.Bitmap)
'Return sIcon.FromHandle(oBitmap.GetHicon)
even better, how would i get the resource from the dll from the application
exe? i just need to read out some icons.... thanks!