PRB: Run-Time Error 372 Occurs with the ImageList Control in Microsoft Visual Basic 6.0

Article translations Article translations
Article ID: 818616 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

When you run a Microsoft Visual Basic application that loads an ImageList control, you may receive the following error message:
Run-time error 372:
Failed to load control 'ImageList' from mscomctl.ocx. Your version of mscomctl.ocx may be outdated.
Make sure you are using the version of the control that was provided with your application.

CAUSE

This problem occurs if the ImageList control includes icons that have more colors than the color depth of the Windows desktop can support.

RESOLUTION

To resolve this problem, do one of the following things:
  • Edit the icons to use a lower color depth (use 8-bit color instead of 16-bit, 24-bit, or 32-bit), and then recompile the Visual Basic application by using the lower color depth.
  • Increase the color depth on the computer that the application is running on. To change the color depth, follow these steps:
    1. On the Windows desktop, right-click Properties.
    2. Click the Settings tab.
    3. Under Color Quality, click to select a higher number of display colors.
    4. Click Apply, and then click OK.
Note The maximum color depth of some video cards is limited to 8-bits or 256 colors. In this case, you must recompile the application at the lower color depth.

STATUS

This behavior is by design.

Properties

Article ID: 818616 - Last Review: April 28, 2003 - Revision: 1.1
APPLIES TO
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Professional Edition
Keywords: 
kbprb KB818616

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com