|
-
Feb 1st, 2019, 11:06 AM
#1
Thread Starter
Junior Member
PrintDialog PrintDocument Change the font
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|