Generate Simple QR Code | VB.NETByteScout QR Code SDK

Generate Simple QR Code | VB.NET

Module1.vb:

VB
Imports Bytescout.BarCode

Module Module1

    Sub Main()

        ' Create and activate QRCode instance
        Using barcode As New QRCode()

            barcode.RegistrationName = "demo"
            barcode.RegistrationKey = "demo"

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

            ' Uncomment if you don't need margins
            'barcode.Margins = New Margins(0, 0, 0, 0)
            'barcode.DrawQuietZones = False

            ' Save barcode image to file
            barcode.SaveImage("result.png")

        End Using

        ' Open the image in default image viewer (for demo purpose)
        Process.Start("result.png")

    End Sub

End Module