The two sample applications work together to demonstrate dynamic control addition, or the Add Method for the Controls collection. The first sample, CtlCfg.vbp, adds control license keys to the Controls.mdb database using the Licenses.Add method. The second sample, CtlView, uses the information (license keys) stored in the database to dynamically load controls.
File | Description |
Controls.mdb | Access database that holds license key information. |
CtlCfg.frm | Control configuration form. |
CtlCfg.frx | Control configuration binary data. |
CtlCfg.vbp | Control configuration project file. |
CtlView.frm | Control view form. |
CtlView.frx | Control view binary data. |
CtlView.vbp | Control view project file. |
First open and run the CtlCfg.vbp project. If you have any user controls (that require license keys), you can add the keys to the database using the application.
To Add A Control's License Key
Open and run the CtlView.vbp project. A grid on the form displays the names of controls that can be dynamically added. Click the control name to add it to the form.