• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 841
  • Last Modified:

Load/Save ImageList(s)

Can ImageList(s) Be Loaded And Saved At Runtime?
& Can An ImageList(s) Be Saved With A Unique File
Extension? Can Someone Provide Sample Code using
vb5/vb6. Thanx

1 Solution
This is a fairly simple way of adding a new ImageList at runtime.  

Under General Declarations:
Dim intImageListCount as Integer

Private Sub Command1_Click()
    Load imlImageListName(intImageListCount )
    imlList(intCount).ListImages.Add 1, "keyname", LoadPicture(App.Path & "\icons\youricon.ico")
    intImageListCount = intImageListCount + 1
End Sub

This is pretty basic but when the Command1 button is clicked it creates a new imagelist and adds one icon to it with an index of 1 and a key of "keyname".  But it allows you to add/delete as many ImageLists and icons/bitmaps to the ImageList.

As for changing the extension of the ImageList, there is no way to do that as it is part of the MSCOMCTL.ocx ActiveX Control.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now