VB Migration Partner

KNOWLEDGE BASE - Forms and controls

Previous | Index | Next 

[HOWTO] Create an instance of the VB6ImageList control at runtime

In previous versions of VB Migration Partner it was possible to create a runtime instance of the VB6ImageList control by using code like this:

        Dim imgFolders As New VB6ImageList
        imgFolders.ListImages.Add(, "Open", LoadPicture6(App6.Path & "\FolderOpen.ico"))

(Please notice that this code cannot be the result of a migration, because you can’t instantiate an ImageList control in this fashion under VB6.)

Starting with version 1.34, this syntax isn’t supported any longer, because we changed the implementation of the VB6ImageList class, as explained in this KB article. To have the previous code work correctly you need to manually create a .NET ImageList control and assign it to the ImageList property that the VB6ImageList class exposes, as this code demonstrates:

        Dim imgFolders As New VB6ImageList
        imgFolders.ImageList = New ImageList()
        imgFolders.ListImages.Add(, "Open", LoadPicture6(App6.Path & "\FolderOpen.ico"))
Previous | Index | Next 

Follow Francesco Balena on VB6 migration’s group on


Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.

Code Architects and its partners offers remote and onsite migration services.

More details

Subscribe to our free newsletter for useful VB6 migration tips and techniques.


To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice

A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial

The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote

Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers