11.3. Adding ActiveX Controls in Visual Basic

To add an ActiveX Control in Visual Basic first add it to the Control Toolbar.

  1. Right click on the Control Toolbar and select Components... from the drop-down box.

  2. Choose the ActiveX Controls from the list. (e.g. Morovia Barcode ActiveX). Click OK.

  3. Icons for the ActiveX Controls will now appear in the Control Toolbar. The Morovia Barcode ActiveX control is shown in this toolbar.

  4. Double-click on an icon to add a control to the form. As each icon is added it will be given its own name (e.g. MoroviaBarcodeActiveX1).

  5. Use the names of the controls to call ActiveX functions. All of the available methods for the ActiveX function appear in the pop-up box as the control is entered. The ActiveX functions should be preceded by the Call function when accessing methods that do not require the return of a value. When the method is preceded by an "=" i.e, when returning a variable value, Call is not required.