Article ID: 318597 - View products that this article applies to.
This article was previously published under Q318597
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:
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.
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:
Method 1: Install Visual Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NETUnlike 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 registryImportant This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/322756/ )How to back up and restore the registry in Windows
To add the licensing keys for the Visual Basic 6.0 controls to the registry, follow these steps:
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
The .ocx files are located in the SYSTEM32 subfolder of the Windows folder. The following list includes some of the ActiveX controls and their corresponding file names:
Note You must have a Visual Studio license agreement to get this corrected Vb6control.reg file. There is no charge for this support service.
For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Steps to reproduce the behavior
Error when you try to add an ActiveX control to a form in Visual Studio 2005 or in Visual Studio .NET
Upgrade Wizard error
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/311324/ )Install Visual Basic .NET or Visual Basic 2005 on the same computer as a Visual Basic 6.0 upgrade project
Article ID: 318597 - Last Review: September 22, 2006 - Revision: 4.5