VB6 Code snippets

Use the following links to view code snippets for the 3 different interfaces commonly used from Visual Basic 6…

ActiveX/OCX Interface

‘Add SoftekBarcode ActiveX Control module by selecting Components from the Projects
‘menu

‘Set properties
SoftekBarcode1.ReadCode128 = True

‘Read barcodes
nBarCodes = SoftekBarcode1.ScanBarCode(Path)

‘Get results
For i = 1 To nBarCodes
strBarcode = SoftekBarcode1.GetBarString(i)

COM Object

Dim i As Variant

‘Create the Barcode object
Set oBarcode = CreateObject(“SoftekATL.Barcode”)

‘Set properties
oBarcode.ReadCode128 = True

‘Read barcodes
oBarcode.ScanBarCode(Path)
nBarCodes = oBarcode.BarCodeCount

‘Get results
For i = 1 to nBarCodes
strBarcode = oBarcode.barstring(i)