Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| 'Controls - How to Load a bitmap and save it as an icon
'Load the bitmap into an ImageList control. Use SavePicture and the ImageList's
'Extract Icon method to save the icon.
Private Sub Command1_Click()
' Load the picture into the ImageList.
ImageList1.ListImages.Add , , LoadPicture(txtBmp.Text)
' Set the form's icon.
Set Icon = ImageList1.ListImages(1).ExtractIcon
' Save the icon file.
SavePicture ImageList1.ListImages(1).ExtractIcon, txtIco.Text
End Sub |