You receive an error message "You do not have a license to use this control" when you use Visual Basic 6.0 controls in Visual Studio 2005 or in Visual Studio .NET (318597)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q318597 Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows registry SYMPTOMS When you use Microsoft Visual Basic 6.0 ActiveX controls in
Microsoft Visual Studio 2005 or in Microsoft Visual Studio .NET, you may experience the following problems:
- When you try to add an ActiveX control that was included
with Visual Basic 6.0 to a form in Visual Studio 2005 or in Visual Studio .NET, you receive the following
error message:
You do not have a license to use this
ActiveX control. You can add the control to the toolbox
successfully, but you receive this error message when you add the control at
design time. - When you upgrade a Visual Basic 6.0 project to Visual Studio 2005 or to Visual Studio .NET, you receive the following error message when the Upgrade Wizard
parses in the forms:
Visual Basic Upgrade Wizard
error Upgrade failed: Exception occurred: Could not load referenced
component: comdlg32.ocx(1.2.0) You need to install this component before
you upgrade the project. It is recommended you install VB6.0, with all
referenced components, and ensure the application compiles and runs before
upgrading. When you click OK, the Upgrade Wizard closes, and the conversion process
stops.
CAUSE You must have a design-time license to use Visual Basic 6.0
ActiveX controls. These errors occur because the system registry does not
contain the design-time license information. When you upgrade a project that
contains Visual Basic 6.0 ActiveX controls, or when you try to use Visual Basic
6.0 ActiveX controls on a form in Visual Studio 2005 or in Visual Studio .NET, those controls must be
installed and licensed on the target system.
Visual Studio 2005 and Visual Studio .NET do
not install the license information for Visual Basic 6.0 ActiveX controls
unless the Visual Basic 6.0 controls are installed on the computer that is running Visual Studio 2005 or Visual Studio .NET. This behavior may occur if Visual Basic 6.0 was never installed on the computer.
You do not receive these errors on a computer
on which both Visual Basic 6.0 and Visual Studio 2005 or Visual Studio .NET are installed because
Visual Basic 6.0 installs the components and registers the licenses.
RESOLUTION To resolve this problem, you must install the .ocx files
for the ActiveX controls on the computer before you upgrade
the project or before you use Visual Basic 6.0 ActiveX controls on a form in Visual Studio 2005 or in Visual Studio .NET. To do this, use one of the following methods:
- Install Visual Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NET.
- Add the licensing keys to the registry.
Method 1: Install Visual Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NET Unlike earlier versions of Visual Basic, there are no conflicts
between Visual Basic 6.0 and Visual Studio 2005 or Visual Studio .NET when you install these programs
on the same system. In many cases, Microsoft recommends that you install Visual
Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NET. If Visual Basic 6.0 is
available on the computer, you can change the original
Visual Basic 6.0 project more easily before you upgrade to Visual Studio 2005 or to Visual Studio .NET.
For more information about how to install Visual Basic 6.0 and how to upgrade a
project from Visual Basic 6.0 to Visual Studio 2005 or to Visual Studio .NET, see the "References"
section. Method 2: Add the licensing keys to the registryWarning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk. To
add the licensing keys for the Visual Basic 6.0 controls to the registry,
follow these steps:
- Insert the Visual Studio 2005 or Visual Studio .NET Installation Disk that has
the \Extras\VB6 Controls folder in the in the CD-ROM or DVD-ROM drive. The
following list describes what disk to use for each product edition on CD-ROM:
Visual Studio 2005 (not the Microsoft Developer Network [MSDN] disk)
- Professional Edition - Disk 2
- Standard Edition - Disk 1
Note The VB6Controls.reg registry file is not on the distribution media for any Visual Studio 2005 product.
Visual Studio .NET 2003 (not the MSDN disk)
- All Enterprise Editions - Disk 2
- Professional Edition - Disk 2
- Standard Edition - Disk 1
- Academic Edition - Disk 2
Visual Studio .NET 2002 (not the MSDN disk)
- All Enterprise Editions - Disk 4
- Professional Edition - Disk 4
- Standard Edition - Disk 3
- Academic Edition - Disk 4
- Click Start, and then click Run.
- In the Run dialog box, type regedit, and then click OK.
- In the Registry Editor dialog box, click Import on the File menu.
- Locate the \Extras\VB6 Controls folder on the Installation CD-ROM, select the VB6Controls.reg file, and then
click Open. This step inserts all of the Visual Basic 6.0 ActiveX Controls
license keys in the registry.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.REFERENCES
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
311324
Install Visual Basic .NET or Visual Basic 2005 on the same computer as a Visual Basic 6.0 upgrade project
Modification Type: | Minor | Last Reviewed: | 9/22/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbtshoot kberrmsg kbprb KB318597 kbAudDeveloper |
---|
|