To add an Active 2D-Barcode Control to a Visual Basic form, select Components from the VB Project menu. If Active 2D-Barcode Control module is displayed in the list of available controls, then ensure that it is checked. If it does not appear in the list user the Browse button to locate DLS2D4.DLL in its installation directory (or in Windows System or System32 where the dLSoft Setup program places it), then check its name in the list. Once checked, an icon representing the control will appear in the toolbox.
Clicking on the Active 2D-Barcode Control icon in the toolbox causes the cursor to change to a cross. Positioning the cross on a Visual Basic form, holding down the left mouse button and dragging the cursor down and to the left, then releasing the mouse button, causes a rectangle to be drawn on the form. An image of a (default) barcode will be shown within this rectangle. You may wish to use this image of the control. Alternatively you may hide the control (by setting its Visible property to false) and use the controls methods and properties to create an image that is placed elsewhere on the form – as in the sample Visual Basic program that is supplied with the control and uses code of the form:
AdBarcode1.ImageHeight = i
AdBarcode1.ImageWidth =
j
AdBarcode1.Xunit = 0
AdBarcode1.CodeType = type
AdBarcode1.Caption = Text
Image1.Picture =
AdBarcode1.Picture
A single Visual Basic Form may contain any number of Active 2D-Barcode Controls. The first to be added will be called AdBarcode1, the second A2barcode2, and so on; the names may be changed by the user by modifying the Name property within the Visual Basic Properties box.
Alternatively an array of controls may be created using the Index property.
More: