The GetIPictureDispFromBitmap method can be used to convert an existing .NET System.Drawing.Bitmap object into a Stdole.StdPicture object.
Syntax
Visual Basic (Declaration) | |
---|
Public Shared Function GetIPictureDispFromBitmap( _
ByVal bitmap As Bitmap _
) As Object |
Visual Basic (Usage) | Copy Code |
---|
Dim bitmap As Bitmap
Dim value As Object
value = OLE.GetIPictureDispFromBitmap(bitmap) |
Parameters
- bitmap
- A System.Drawing.Bitmap object.
Return Value
A stdole.StdPicture object.
Example
[C#] System.Drawing.Bitmap dotNetBmp = new System.Drawing.Bitmap(@"C:\Temp\MyBitmap.bmp");
ESRI.ArcGIS.Display.IPictureMarkerSymbol bmpSym = new ESRI.ArcGIS.Display.PictureMarkerSymbolClass() as ESRI.ArcGIS.Display.IPictureMarkerSymbol;
bmpSym.Picture = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromBitmap(dotNetBmp) as stdole.IPictureDisp;
[Visual Basic .NET] Dim dotNetBmp As System.Drawing.Bitmap = New System.Drawing.Bitmap("C:\Temp\MyBitmap.bmp")
Dim bmpSym As ESRI.ArcGIS.Display.IPictureMarkerSymbol = New ESRI.ArcGIS.Display.PictureMarkerSymbol
bmpSym.Picture = ESRI.ArcGIS.Utility.COMSupport.OLE.GetIPictureDispFromBitmap(dotNetBmp)
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also