Hi All

I have created a form that collects data for bar codes the data is then Encode and the bar code is displayed in a text box.

However when I try and print the text box only I just get nonsense printed.

I am using IDAutomationSC128S Demo Symbol font to generate the barcode, do i need to change the PrintDocument font (if i can)?


Thanks in advance




Private Sub txtBarcode_TextChanged(sender As Object, e As EventArgs) Handles txtBarcode.TextChanged

End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click

PrintDialog3.AllowSomePages = True
PrintDialog3.ShowHelp = True
If PrintDialog3.ShowDialog = DialogResult.OK Then
If txtBarcode.Text <> "" Then
PrintDocument3.Print()

End If
End If
End Sub

Private Sub PrintDocument3_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument3.PrintPage
e.Graphics.DrawString(txtBarcode.Text, Me.Font, Brushes.Black, e.MarginBounds, StringFormat.GenericTypographic)

End Sub
End Class