ESRI.ArcGIS.ADF
GetIPictureDispFromBitmap Method
See Also  Example Send comments on this topic.
ESRI.ArcGIS.ADF.COMSupport Namespace > OLE Class : GetIPictureDispFromBitmap Method




bitmap
A Bitmap object.
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)
C# 
public static object GetIPictureDispFromBitmap( 
   Bitmap bitmap
)

Parameters

bitmap
A Bitmap object.

Return Value

A stdole.StdPicture object.

Example

[C#]
[Visual Basic .NET]
C#Copy Code
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;
C#Copy Code
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)

See Also

© 2010 All Rights Reserved.