I am using the code below to populate the DataGridView. I need help in that the Barcode Image is not being generated according to the txtLab.text amd the alphamumeric value. Please see attached image. Thanks

Private Sub btnAdd_Click(sender As System.Object, e As System.EventArgs) Handles btnAdd.Click
        Dim alphaNumeric As String = String.Empty
        Dim number As String = txtSubNo.Text
        Dim alphabet As String = txtAlpha.Text
        Dim loopValue As String = txtNo.Text


        For index As Integer = 0 To loopValue - 1
            alphaNumeric = number.ToString & alphabet
            C1BarCode.Text = txtLabNo.Text & "-" & alphaNumeric.ToString
            DataGridView1.Rows.Add(txtLabNo.Text, "" & alphaNumeric, txtIndicator.Text, C1BarCode.Image)

            If txtAlpha.Text = "" Then
                Exit Sub
            Else
                If Asc(alphabet) + 1 <= 90 Then
                    alphabet = Chr(Asc(alphabet) + 1)
                Else
                    alphabet = "A"
                End If
            End If
        Next
    End Sub

Since images are not text I don't see how that would work. I did work in VB that made barcodes but I used another method. I would use a Barcode Font for the text display box. Never used images since the barcode font approach worked so well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.