CodeItBetter Programming Another VB Programming Blog

How to Load a bitmap and save it as an icon

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
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.