Link Search Menu Expand Document

QR Code With Message - VB.NET

BarCode SDK sample in VB.NET demonstrating ‘QR Code With Message’

Imports Bytescout.BarCode

Module Module1

    Sub Main()

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

            ' Set barcode type
            barcode.Symbology = SymbologyType.QRCode

            ' Inputs
            Dim inpEmail = New QrCodeMessageTemplate With {
            .Message = "Here goes sample message...!"

            ' Set barcode value
            barcode.Value = inpEmail.ToString()

            ' Save generated barcode

            ' Open generated barcode image with associated application

        End Using

    End Sub

End Module

Public Class QrCodeMessageTemplate

#Region "Constructors"

    Public Sub New()
    End Sub

    Public Sub New(ByVal Message As String)
        Me.Message = Message
    End Sub

#End Region

#Region "Properties"

    Public Property Message As String

#End Region

#Region "Overloaded Methods"

    Public Overrides Function ToString() As String

        If String.IsNullOrEmpty(Message) Then Return MyBase.ToString()

        Return Message

    End Function

#End Region

End Class

Download Source Code (.zip)

Return to the previous page Explore BarCode SDK