VB之BMP,JPG转ICO代码
在窗体上放置picture和ImageList控件
picture1装入需要的图片,如jpg,bmp等。
下面是讲picture1中的图片存储为ICO格式的代码:
ImageList1.Listmages.add ,,Picture1.picture
Dim Pic as stdPicture 或 object
set pic=Imagelist1.ListImages(1).ExtractIcon
Image1.Picture=pic
savePicture Image1.picture,"d:\a.ico"