开发者

VB6 Extract Images (any kind) from a ImageList

开发者 https://www.devze.com 2023-02-17 07:43 出处:网络
Extract I开发者_StackOverflowmages (any kind) from a ImageList and save it as a file with extension

Extract I开发者_StackOverflowmages (any kind) from a ImageList and save it as a file with extension

VB6 Extract Images (any kind) from a ImageList


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.

So you could use something like the following code:

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


I think this is what you want: http://btmtz.mvps.org/gfxfromfrx/

I found pretty handy.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号