Using ImageList from VB6 application causes crash on Windows 7.0 64-bit

imagelistlistviewtreeviewvb6win64

I have an old VB6 application that uses an ImageList control from COMCTL32.OCX ("Microsoft Windows Common Controls 5.0 (SP2)") to provide icons for TreeViews and ListViews.

The app won't even launch on Windows 7.0 64 bit. The minute it tries to load the form that has the ImageList on it, it crashes (well, actually, the app winks out, exiting without a trace).

Removing the ImageList from the form solves the problem.

Any ideas?

Best Solution

I resolved this problem by replacing all instances of COMCTL32.OCX, which came with VB5, with MSCOMCTL.OCX, which came with VB6.

Microsoft KB article 190952 has instructions for doing this. It was pretty much just a global-search-and-replace operation.