Link Search Menu Expand Document

Make QR Code With Embedded Image - VBScript and VB6

QR Code SDK sample in VBScript and VB6 demonstrating ‘Make QR Code With Embedded Image’

QRCodeWithImage.vbs
' Create and activate QRCode instance
Set barcode = CreateObject("Bytescout.BarCode.QRCode")
barcode.RegistrationName = "demo"
barcode.RegistrationKey = "demo"

' Set high QR Code error correction level
barcode.QROption_ErrorCorrectionLevel = 3 ' 3 = QRErrorCorrectionLevel.High

' Set barcode value
barcode.Value = "1234567890 abcdefghijklmnopqrstuvwxyz 1234567890 abcdefghijklmnopqrstuvwxyz"

' Add decoration image and scale it to 15% of the barcode square
barcode.AddDecorationImage ".\logo.png", 15

barcode.SaveImage "result.png"

' Open the output file in default app
Set shell = CreateObject("WScript.Shell")
shell.Run "result.png", 1, false
Set shell = Nothing

Set barcode = Nothing

Download Source Code (.zip)

Return to the previous page Explore QR Code SDK