Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleLoad a bitmap and save it as an icon
Keywordsbitmap, icon, image
CategoriesGraphics
 
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
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated