BUG: Error at run time after you upgrade a Microsoft Visual Basic 6.0 project that uses the ImageList control to Microsoft Visual Basic .NET (814314)
The information in this article applies to:
- Microsoft Visual Basic .NET (2002)
SYMPTOMSWhen you upgrade a Microsoft Visual Basic 6.0 project that
uses the ImageList control to a Microsoft Visual Basic .NET
project by using the Microsoft Visual Basic .NET Upgrade Wizard, you receive
the following exception when you run the project in Visual Basic .NET:
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in
axinterop.mscomctllib.dll CAUSEThe Visual Basic .NET Upgrade Wizard wraps the ImageList control in the AxHost class. However, it does not modify the corresponding Visual Basic
6.0 code to access the underlying ImageList control. For example, the following code may be part of the
migrated Visual Basic .NET code. ListView1.ColumnHeaderIcons = ImageList WORKAROUNDTo work around this problem, assign the underlying ImageList control instead of the wrapper control. You can access the
underlying ImageList control by using the GetOcx method. To do this, locate the following code in the migrated
Visual Basic .NET code: ListView1.ColumnHeaderIcons = ImageList Replace the existing code with the following code: ListView1.ColumnHeaderIcons = ImageList.GetOcx STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
This bug was corrected in Microsoft Visual Basic .NET (2003).
REFERENCES For more information, click the
following article number to view the article in the Microsoft Knowledge Base: 317885
HOW TO: Use the Visual Basic Upgrade Wizard
Modification Type: | Major | Last Reviewed: | 3/20/2006 |
---|
Keywords: | kbvs2005doesnotapply kbvs2005swept kbinterop kbImgList kbMigration kbmigrate kbWindowsForms kbForms kbfix KB814314 kbAudDeveloper |
---|
|