BUG: The ActiveX control that binds to the ImageList ActiveX control may not display the images that are in the upgraded ImageList control after you upgrade a Visual Basic 6.0 project in Visual Studio 2005

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

On This Page

SYMPTOMS

Consider the following scenario. A Microsoft Visual Basic 6.0 project contains a form. The form contains an ImageList ActiveX control. Additionally, the form contains an ActiveX control that binds to the ImageList ActiveX control. For example, the form contains a TabStrip ActiveX control that binds to the ImageList ActiveX control. You upgrade the Visual Basic 6.0 project by using the Visual Basic Upgrade Wizard in Microsoft Visual Studio 2005. In this scenario, the ActiveX control that binds to the ImageList ActiveX control may not display the images that are in the upgraded ImageList control.

CAUSE

This problem occurs because the ActiveX control that binds to the ImageList ActiveX control is not upgraded to an equivalent managed Microsoft Windows Forms control. However, the ImageList ActiveX control is upgraded to an equivalent managed Windows Forms control. Therefore, the unmanaged ActiveX control cannot locate the upgraded ImageList control.

WORKAROUND

To work around this problem, use one of the following methods. Use the method that fits your situation the best.

Method 1: Add an ImageList ActiveX control to the Windows Form

Add an ImageList ActiveX control to the Windows Form that is created by the Visual Basic Upgrade Wizard. Then, add images to the ImageList ActiveX control, and bind other ActiveX controls to the ImageList ActiveX control.

To add an ImageList ActiveX control to the Windows Form, follow these steps:
  1. Start Visual Studio 2005.
  2. On the File menu, point to Open, and then click Project/Solution.
  3. Locate the project that you want to open, and then click Open.
  4. On the Tools menu, click Choose Toolbox Items.
  5. Click the COM Components tab.
  6. In the Name column, click to select the Microsoft ImageList Control, version 6.0 check box.
  7. Click OK.
  8. Add an ImageList ActiveX control to the Windows Form.

Method 2: Add an equivalent managed Windows Forms control to the Windows Form

Add an equivalent managed Windows Forms control to the Windows Form that is created by the Visual Basic Upgrade Wizard. Then, bind the equivalent managed Windows Forms control to the upgraded ImageList control. For example, if the Visual Basic 6.0 project contains a TabStrip ActiveX control, add a TabPage managed Windows Forms control to the Windows Form.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

  1. Create a Visual Basic 6.0 project that contains the following controls:
    • A TabStrip ActiveX control
    • An ImageList ActiveX control
  2. Bind the TabStrip ActiveX control to the ImageList ActiveX control.
  3. Start Visual Studio 2005.
  4. On the File menu, click Open, and then click Project/Solution.
  5. Locate the Visual Basic 6.0 project, click the project file name, and then click Open.

    The Visual Basic Upgrade Wizard starts.
  6. Click Next.
  7. Under Choose a Project Type, click EXE, and then click Next.
  8. Type a location for the project, and then click Next.
  9. If the folder does not exist, click Yes to create the folder.
  10. To start the upgrade, click Next.
  11. After the upgrade is complete, double-click the form file name in Solution Explorer.

    Notice that the ImageList control is a managed Windows Forms control. Notice that the TabStrip control is an ActiveX control.

Properties

Article ID: 919483 - Last Review: June 27, 2006 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio 2005 Team System Architect Edition
  • Microsoft Visual Studio 2005 Team System Developer Edition
  • Microsoft Visual Studio 2005 Team System Test Edition
  • Microsoft Visual Studio 2005 Team Foundation
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
Keywords: 
kbtshoot kbbug KB919483

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