Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Load/Save ImageList(s)

Posted on 1999-10-23
Medium Priority
Last Modified: 2013-12-26
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

Question by:rhankins99
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

MTroutwine earned 120 total points
ID: 2152891
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.



Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question