• Barcode download

Print Barcode in Visual Basic

To print Barcode from Visual Basic, you need Barcodesoft true type font and cruflbcs.dll.

If you download and install the demo of Barcodesoft Barcode font on your computer, you will find crUFLBCS.dll from
"C:\Program Files (x86)\Common Files\Barcodesoft\Fontutil\" folder.

If you don't find cruflbcs.dll on your computer, please download it from Barcode Visual Bsic..

crUFLBCS.dll is a COM object with ILinear interface.
You can find detailed information about ILinear interface from readme.html.

To call the methods of ILinear interface from Visual Basic, you can use either Late Binding or Early Binding.

Late binding is used when type information of an object is unavailable at compile time.

Early binding requires the client to get access to the type library before compile.

Late Binding


Your codes to create Barcode run slower than using Early Binding.

However, your codes are version-independent as long as COM interface and method parameters remain unchanged.
Dim cruflBCSObj As Object
Set cruflBCSObj = CreateObject("cruflBCS.ILinear.1")
Dim retval As String
retval = cruflBCSObj.GS1128(strTemp)

After apply font code128m to returned string "retval", you will get a GS1128 barcode.
Early Binding


Early binding requires the client to get access to the type library before compile.

Your codes using early binding to print barcode run faster than using late binding.

1. Click Project menu, choose "Add Reference..." to load the type information of cruflBCS.dll.

Barcode Visual Basic add reference

2. Use the following code snippet to print barcode from Visual Basic.

Barcode Visual Basic add reference

Dim obj As cruflBCS.CLinear
Set obj = New cruflBCS.CLiear
barcode = obj.GS1128(strToEncode)

3. After set font to code128, you will get a Barcode in Visual Basic.

  • Barcode barcode download