How to resolve: You do not have a license to use this ActiveX control

From: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q318/5/97.asp&NoWebContent=1

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

<script type="text/javascript">function loadTOCNode(){}</script>
Article ID:318597
Last Review:September 22, 2006
Revision:4.1
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 (http://support.microsoft.com/kb/256986/) Description of the Microsoft Windows registry
<script type="text/javascript"> var sectionFilter = "type != 'notice' && type != 'securedata' && type != 'querywords'"; var tocArrow = "/library/images/support/kbgraphics/public/en-us/downarrow.gif"; var depthLimit = 10; var depth3Limit = 10; var depth4Limit = 5; var depth5Limit = 3; var tocEntryMinimum = 1; </script><script src="/common/script/gsfx/kbtoc.js?5" type="text/javascript"></script>

SYMPTOMS

<script type="text/javascript">loadTOCNode(1, 'symptoms');</script>
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.

Back to the top

CAUSE

<script type="text/javascript">loadTOCNode(1, 'cause');</script>
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.

Back to the top

RESOLUTION

<script type="text/javascript">loadTOCNode(1, 'resolution');</script>
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.

Back to the top

Method 1: Install Visual Basic 6.0 on the computer that is running Visual Studio 2005 or Visual Studio .NET

<script type="text/javascript">loadTOCNode(2, 'resolution');</script>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.

Back to the top

Method 2: Add the licensing keys to the registry

<script type="text/javascript">loadTOCNode(2, 'resolution');</script> Warning 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:
1.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
2.Click Start, and then click Run.
3.In the Run dialog box, type regedit, and then click OK.
4.In the Registry Editor dialog box, click Import on the File menu.
5.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.

Back to the top

STATUS

<script type="text/javascript">loadTOCNode(1, 'status');</script>
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Back to the top

MORE INFORMATION

<script type="text/javascript">loadTOCNode(1, 'moreinformation');</script>
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:
ADO Data Control 6.0 (OLEDB) - Msadodc.ocx
Chart Control 6.0 - Mschrt20.ocx
Chart Control 6.0 (OLEDB) - Mschrt20.ocx
Comm Control 6.0 - Mscomm32.ocx
Common Dialog Control 6.0 - Comdlg32.ocx
Data Bound Grid Control 5.0(SP3) - Dbgrid32.ocx
Data Bound List Controls 6.0 - Dblist32.ocx
DataGrid Control 6.0 (OLEDB) - Msdatgrd.ocx
DataList Control 6.0 (OLEDB) - Msdatlst.ocx
FlexGrid Control 6.0 - Msflxgrd.ocx*
Internet Transfer Control 6.0 - Msinet.ocx
MAPI Controls 6.0 - Msmapi32.ocx
Masked Edit Control 6.0 - Msmask32.ocx
Multimedia Control 6.0 - Mci32.ocx
RemoteData Control 6.0 - Msrdc20.ocx
PictureClip Control 6.0 - Picclp32.ocx
Rich TextBox Control 6.0 - Richtx32.ocx
SysInfo Control 6.0 - Sysinfo.ocx
Windowless Controls 6.0 - Mswless.ocx
Windows Common Controls - Comctl32.ocx
Windows Common Controls 6.0 - Mscomctl.ocx
Windows Common Controls-2 5.0 (SP2) - Comct232.ocx
Windows Common Controls-2 6.0 - Mscomct2.ocx
Windows Common Controls-3 6.0 - Comct332.ocx
Winsock Control 6.0 - Mswinsck.ocx
* In Visual Studio .NET 2002, the VB6Controls.reg file that included the license for FlexGrid Control 6.0 is wrong. However, in Visual Studio .NET 2003, the VB6Controls.reg file has been corrected.

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:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)

Back to the top

Steps to reproduce the behavior

<script type="text/javascript">loadTOCNode(2, 'moreinformation');</script>
Error when you try to add an ActiveX control to a form in Visual Studio 2005 or in Visual Studio .NET
<script type="text/javascript">loadTOCNode(3, 'moreinformation');</script>
1.Install Visual Studio 2005 or Visual Studio .NET on Computer A. Make sure that Visual Basic 6.0 has never been installed on this computer.
2.Install only Visual Basic 6.0 on Computer B.
3.Copy a Visual Basic .ocx file from the SYSTEM32 folder of Computer B to the SYSTEM32 folder of Computer A.
4.On Computer A, start Visual Studio 2005 or Visual Studio .NET, and then create a new Windows Application project in Microsoft Visual Basic 2005 or in Microsoft Visual Basic .NET.
5.Right-click in the toolbox, and then click Customize Toolbox.
6.On the COM Components tab, click Browse.
7.Select the .ocx file that you copied in step 3, and then click Open. Notice that the control is added to the list and that its check box is selected. Click OK.
8.Drag the ActiveX control from the toolbox onto the form. You receive the following error message:
You do not have a license to use this ActiveX control.
Upgrade Wizard error
<script type="text/javascript">loadTOCNode(3, 'moreinformation');</script>
1.Install Visual Studio 2005 or Visual Studio .NET on a computer where Visual Basic 6.0 has never been installed.
2.Start Visual Studio 2005 or Visual Studio .NET.
3.On the File menu, click Open.
4.Select a Visual Basic 6.0 project that contains an ActiveX control on the form, and then click OK. This starts the Upgrade Wizard.
5.Complete the steps in the Upgrade Wizard. You receive the following error message:
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.
6.Click OK in the error message dialog box. Notice that the Upgrade Wizard closes.

Back to the top

REFERENCES

<script type="text/javascript">loadTOCNode(1, 'references');</script>
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
311324 (http://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

Back to the top


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
Microsoft Visual Studio .NET 2003 Enterprise Developer
Microsoft Visual Studio .NET 2003 Academic Edition
Microsoft Visual Studio .NET 2002 Professional Edition
Microsoft Visual Studio .NET 2002 Enterprise Architect
Microsoft Visual Studio .NET 2002 Enterprise Developer
Microsoft Visual Studio .NET 2002 Academic Edition

Back to the top

Keywords: 
kbvs2005swept kbvs2005applies kbtshoot kberrmsg kbprb KB318597

Back to the top

  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值