从 ImageList 中提取图像(任何类型)并将其保存为扩展名为
的文件
Extract Images (any kind) from a ImageList and save it as a file with extension
您是否已经尝试过使用 ExtractIcon 方法?这将返回一个表示 ListImage 项目图标的 IPictureDisp 对象。
ExtractIcon
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!)
Have you already tried using the ExtractIcon method? That will return an IPictureDisp object representing an icon of the ListImage item.
Then, once you have extracted the picture object, you can simply call the SavePicture function to save it to a file on disk.
SavePicture
So you could use something like the following code:
我认为这就是你想要的: http://btmtz.mvps.org/gfxfromfrx/
我发现非常方便。
I think this is what you want: http://btmtz.mvps.org/gfxfromfrx/
I found pretty handy.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
您是否已经尝试过使用
ExtractIcon
方法?这将返回一个表示ListImage
项目图标的IPictureDisp
对象。然后,一旦提取了图片对象,您只需调用 SavePicture 函数即可将其保存到磁盘上的文件中。
所以你可以使用类似下面的代码:
Have you already tried using the
ExtractIcon
method? That will return anIPictureDisp
object representing an icon of theListImage
item.Then, once you have extracted the picture object, you can simply call the
SavePicture
function to save it to a file on disk.So you could use something like the following code:
我认为这就是你想要的: http://btmtz.mvps.org/gfxfromfrx/
我发现非常方便。
I think this is what you want: http://btmtz.mvps.org/gfxfromfrx/
I found pretty handy.