System.Windows.Forms.AxHost.GetPictureFromIPicture Method

Returns an System.Drawing.Image corresponding to the specified OLE IPicture object.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected static System.Drawing.Image GetPictureFromIPicture (object picture)

Parameters

picture
The IPicture to convert.

Returns

An System.Drawing.Image representing the IPicture.

Remarks

You can use this method to convert IPictureDisp objects in addition to IPicture objects. This works because the IPictureDisp OLE interface is a subset of the IPicture interface. Converting IPictureDisp objects with this method is necessary because the AxHost.GetPictureFromIPictureDisp(object) does not work correctly at this time.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0