Search code examples
vb6controlsimagelist

How to restore the images uploaded for imagelist control in VB 6.0


I have a VB 6.0 application which contains some images inside a imagelist control. I want to know where these images get stored in the system (because I want to use these images in another application and I don't have the images separately in the system).

So, the only way is to take the images from Visual Basic 6.0 project. Do we have anything like resource folder similar to .Net?


Solution

    • Start an empty project.
    • Add reference (Ctrl+T) to Microsoft Windows Common Controls 5.0 or 6.0
    • Copy/Paste image list control to Form1
    • Rename image list control to ImageList1

    Use this code

    Dim lIdx As Long
    
    For lIdx = 1 To ImageList1.ListImages.Count
        SavePicture ImageList1.ListImages(lIdx).Picture, "C:\TEMP\img" & lIdx & ".bmp"
    Next