Generate dynamic QRCode from ListView using VB.Net in Windows Application

Last Reply 6 months ago By nirmal90

Posted 7 months ago

I want to generate a Dynamic QR code in VB.Net. In a form, I am having a listview. I want to generate a Dynamic QR code base on the ListView.

I have tried using the textbox and it's generating the QR Code. Now i want to generate a QR Code of the ListView

    Private Sub btnQRCode_Click(sender As Object, e As EventArgs) Handles btnQRCode.Click
        Dim objqrcode As QRCodeEncoder = New QRCodeEncoder
        Dim img As Image
        Dim btm As Bitmap
        Dim str As String
        If txtMessage.Items.Count <> 0 Then
            For x As Integer = 0 To txtMessage.Items.Count - 1
                str = txtMessage.Items(x).SubItems(0).Text
                str = txtMessage.Items(x).SubItems(1).Text 
                str = txtMessage.Items(x).SubItems(2).Text
                ''str = txtMessage.Items(x).SubItems(3).Text + txtMessage.Items(x).SubItems(4).Text +
                str = txtMessage.Items(x).SubItems(5).Text
                ''  VL &= "JWI DT &ensp; - " + txtMessage.Items(x).SubItems(6).Text + "<br>" + "<br>"

                '  VL &= "  enter   " + System.Environment.NewLine + vbNewLine + vbCrLf
            Next
            objqrcode.QRCodeScale = 2
            img = objqrcode.Encode(str)
            btm = New Bitmap(img)
        End If
        'str = cmbChallNo.Text + ")" + "  " + cmbLItemType.Text + " - " + txtDate.Text
        'img = objqrcode.Encode(str)
        'btm = New Bitmap(img)
        btm.Save("qrimage.jpg")
        PictureBox1.ImageLocation = "qrimage.jpg"
    End Sub

 

This question does not have replies that have been liked.