The information in this article applies to:
SUMMARYWhen a UserControl contains one or more controls that require run-time licenses, the UserControl implicitly becomes a licensed control (requires run-time license). As a result, when you use the Controls.Add method to add the UserControl dynamically, you must precede it by calling the Licenses.Add method and provide the license key for the call. MORE INFORMATIONIf you create a UserControl named, for example, MyProject.MyUserControl, containing one or more controls that require a run-time license, MyProject.MyUserControl acquires a run-time license implicitly. Therefore, if you use the Controls.Add method to add MyProject.MyUserControl dynamically, or call Licenses.Add "MyProject.MyUserControl" without providing the license key, you get the following error: To make this work, you must obtain MyProject.MyUserControl's license key on the development computer as follows:
Then, in the client code, you can do the following to dynamically add MyProject.MyUserControl:
REFERENCESFor additional information dynamically adding controls, click the article number below to view the article in the Microsoft Knowledge Base: Q190670 HOWTO: Dynamically Add Controls to a Form with Visual Basic 6.0 Additional query words:
Keywords : kbActiveX kbCtrl kbLicensing kbVBp600 kbGrpVB kbDSupport |
Last Reviewed: November 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |