Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VB6从ImageList中提取图像(任何类型)_Vb6_Image Manipulation_Imagelist - Fatal编程技术网

VB6从ImageList中提取图像(任何类型)

VB6从ImageList中提取图像(任何类型),vb6,image-manipulation,imagelist,Vb6,Image Manipulation,Imagelist,从ImageList中提取图像(任何类型),并将其另存为扩展名为的文件 您是否已经尝试过使用提取图标方法?这将返回一个表示ListImage项图标的IPictureDisp对象 然后,提取图片对象后,只需调用SavePicture函数即可将其保存到磁盘上的文件中 因此,您可以使用如下代码: Dim myPic As Picture Set myPic = ImageList1.ListImages(1).ExtractIcon SavePicture myPic, "C:\MyIcon.ico"

从ImageList中提取图像(任何类型),并将其另存为扩展名为的文件


您是否已经尝试过使用
提取图标
方法?这将返回一个表示
ListImage
项图标的
IPictureDisp
对象

然后,提取图片对象后,只需调用
SavePicture
函数即可将其保存到磁盘上的文件中

因此,您可以使用如下代码:

Dim myPic As Picture
Set myPic = ImageList1.ListImages(1).ExtractIcon
SavePicture myPic, "C:\MyIcon.ico"  '(never hardcode a path in your actual code!)

我想这就是你想要的:

我发现很方便。

这本书的准确副本