• QRCode download

Print QRCode in Visual Basic

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

If you download and install the demo of Barcodesoft QRCode 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 QRCode Visual Bsic..

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

To call the methods of IQRCode 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 QRCode 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.QRCode.1")
cruflBCSObj.SetCRLF (1)
cruflBCSObj.ECLevel = 2
Dim retval As String
retval = cruflBCSObj.Encode(strTemp)

After apply font BCSQRCode to returned string "retval", you will get a QRCode 2d barcode.
Early Binding


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

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

Here is a sample using early binding to print QRCode barcode in Visual Basic. Open Visual Basic EarlyBinding Sample from the following folder
C:\Program Files\Barcodesoft\qrcodefont\.

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

QRCode Visual Basic add reference

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

QRCode Visual Basic add reference

Dim obj As cruflBCS.CBCSQRCode
Set obj = New cruflBCS.CBCSQRCode
cruflBCSObj.ECLevel = 2
qrcode = obj.Encode(strToEncode)
Set obj = Nothing

3. After set font to bcsQRCode, you will get a QRCode in Visual Basic.

  • QRCode barcode download