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"

 

posted @ 2013-02-12 20:35  翱翔软件  阅读(491)  评论(0)    收藏  举报

欢迎访问翱翔软件