vb6 ocx控件如何得到 “要求许可证关键字”?

new_one_one 2013-06-14 12:01:15
我在自己做的ocx控件中选择了“要求许可证关键字”,别人在用该控件的时候如何才能到到许可证?如何使用?
...全文
348 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
threenewbee 2013-06-18
  • 打赏
  • 举报
回复
最简单的就是把注册表中的许可证导出来,在他的电脑上导进去。
milaoshu1020 2013-06-18
  • 打赏
  • 举报
回复
HOWTO: Deploy an ActiveX Control with License Information Q188582 -------------------------------------------------------------------------------- The information in this article applies to: Microsoft Visual Basic Learning Edition for Windows, version 6.0 Microsoft Visual Basic Professional Edition for Windows, version 6.0 Microsoft Visual Basic Enterprise Edition for Windows, version 6.0 -------------------------------------------------------------------------------- SUMMARY Visual Basic 6.0 allows an ActiveX control to require a design-time license in order for it to be used in a development environment. This license is not automatically included when the Package and Deployment Wizard (PDW) packages the control for distribution. MORE INFORMATION When packaging an ActiveX control that has been developed with Visual Basic 6.0, the license for the control can be included in the distribution. This means that whomever installs this control can then use the control for development (design-time), and include it their own projects and applications. When the "Require License Key" option is selected as a Project Property, the ActiveX control cannot be used within a development environment unless the control's license has been installed upon that system. By default, compiling an ActiveX control with the "Require License Key" option selected will generate a license for that control and install it on that system. This allows the control to be used in a development environment on that machine without any extra work by the developer. Distributing the ActiveX control with the Package and Deployment Wizard does not automatically bring the license along with the control. Choosing the default options with the PDW will simply create a run-time setup for the control (the control will install and programs can use it during run- time, but end users cannot develop with the control). Attempting to use the control in a design environment without the proper license will result in the following error: License information for this component not found. You do not have an appropriate license to use this functionality in the design environment. Adding the Design License to an ActiveX Control Distribution Set Create a new ActiveX control in Visual Basic. Select Properties from the Project menu, then select General. Check the "Require License Key" option. Add the following code to the UserControl1 object: Private Sub UserControl_Initialize() UserControl.BackColor = vbBlue End Sub Save the project and make the OCX. On the original development machine, start the Package and Deployment Wizard. Go through the setup as you normally would until you get to the step "Package And Deployment Wizard - Included Files." Click the "Add" button. You will then be allowed to add files to the distribution set. Change the "Files Of Type" filter to "License Files." Select the VBL file that is associated with your test ActiveX Control (Project1) and then continue. There will be a new dialog "Package And Deployment Wizard - Registry Information." This appears because of the VBL file. For this Demonstration, select the default action of "Update Registry." This option will install the license for the ActiveX control into the system's registry and there is no need for a file to be installed. Continue through the wizard, selecting the default settings. Install the ActiveX control onto a second development machine. The ActiveX control can now be used in a design environment. You can test this by creating a new project in Visual Basic on the second development machine and adding the control to a form. Additional query words: kbDSupport kbdss kbAppSetup kbCtrlCreate kbCtrl kbVBp600 kbWizard kbVBp usercontrol Keywords : kbwizard kbAppSetup kbCtrl kbCtrlCreate kbVBp kbVBp600 kbGrpDSVB Issue type : kbhowto Technology : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB600Search kbVBA600 kbVB600

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧