VB6从ImageList中提取图像(任何类型)
从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"
您是否已经尝试过使用
提取图标
方法?这将返回一个表示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!)
我想这就是你想要的: 我发现很方便。这本书的准确副本