AxHost.GetPictureFromIPicture(Object) 方法

定义

返回与指定的 OLE IPicture 对象对应的 Image

protected:
 static System::Drawing::Image ^ GetPictureFromIPicture(System::Object ^ picture);
protected static System.Drawing.Image GetPictureFromIPicture (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

要转换的 IPicture

返回

表示 IPictureImage

注解

除了 对象之外IPicture,还可以使用此方法转换 IPictureDisp 对象。 这之所以有效, IPictureDisp 是因为 OLE 接口是接口的 IPicture 子集。 IPictureDisp使用此方法转换对象是必要的,GetPictureFromIPictureDisp因为 此时无法正常工作。

适用于