ByteScout BarCode Generator SDK – VB.NET – QR Code With JSON

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – VB.NET – QR Code With JSON

ByteScout BarCode Generator SDK – VB.NET – QR Code With JSON

Program.vb

Imports Bytescout.BarCode

Module Program

    Sub Main()

        Try

            ' Create and activate barcode generator instance
            Using barcode As Barcode = New Barcode("demo", "demo")

                ' Set barcode type
                barcode.Symbology = SymbologyType.QRCode

                ' Set JSON string as a value
                barcode.Value = "{ 'name':'John', 'age':30, 'cars':[ 'Ford', 'BMW', 'Fiat' ] }"

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

            End Using

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        End Try

        ' Show image in default image viewer
        Process.Start("result.png")

    End Sub

End Module


  Click here to get your Free Trial version of the SDK

prev
next