AxHost.GetPictureFromIPicture(Object) AxHost.GetPictureFromIPicture(Object) AxHost.GetPictureFromIPicture(Object) AxHost.GetPictureFromIPicture(Object) Method

定义

返回与指定的 OLE IPicture 对象对应的 ImageReturns an Image corresponding to the specified OLE IPicture object.

protected:
 static System::Drawing::Image ^ GetPictureFromIPicture(System::Object ^ picture);
protected static System.Drawing.Image GetPictureFromIPicture (object picture);
static member GetPictureFromIPicture : obj -> System.Drawing.Image
Protected Shared Function GetPictureFromIPicture (picture As Object) As Image

参数

picture
Object Object Object Object

要转换的 IPictureThe IPicture to convert.

返回

表示 ImageIPictureAn Image representing the IPicture.

注解

除了对象之外,还可以使用IPictureDisp此方法转换对象。 IPictureYou can use this method to convert IPictureDisp objects in addition to IPicture objects. 这是因为IPictureDisp OLE 接口是IPicture接口的子集。This works because the IPictureDisp OLE interface is a subset of the IPicture interface. 使用IPictureDisp此方法转换对象是必需的GetPictureFromIPictureDisp ,因为此时不能正常工作。Converting IPictureDisp objects with this method is necessary because the GetPictureFromIPictureDisp does not work correctly at this time.

适用于