0

How can I go about referencing a barcode font in graphics.drawstring? This is my code so far. Its printing the text not the barcode:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) _
     Handles PrintDocument1.PrintPage
    e.Graphics.DrawString(Drugname1, New Font("Arial", 8), Brushes.Black, 10, 10)
    e.Graphics.DrawString("Exp: " & Expirydate_new, New Font("Arial", 8), Brushes.Black, 10, 20)
    e.Graphics.DrawString("Ds Remaining: " & DsRemaining1, New Font("Arial", 8), Brushes.Black, 10, 40)
    e.Graphics.DrawString(barCode, New Font("PrecisionID C128 04 Regular", 10), Brushes.Black, 10, 60)
    Dim g As Graphics
    'Dim Picturebox1 As Image = Image.FromFile("barcode.bmp")
    'g = e.Graphics
    'g.DrawImage(Picturebox1, 0, 0)
    'g.Dispose()
    e.HasMorePages = False
End Sub

Any ideas?

Thanks

Brownd92
  • 75
  • 1
  • 11
  • If you can't figure it out from the vendor's sample code and you are sure that the font is installed properly then call +1 828-414-3515 to ask for help. – Hans Passant Sep 09 '15 at 09:21
  • Thanks Hans, not really that helpful and yes the font is installed correctly. – Brownd92 Sep 09 '15 at 09:34
  • http://meta.stackoverflow.com/questions/255745/why-were-not-customer-support-for-your-favorite-company – Hans Passant Sep 09 '15 at 09:45
  • Thanks Hans, but this is not a question related to any vendor in particular. It is a straight VB question. I am just wanting to know if someone can shed some light as to why the barcode prints as numbers and not as a barcode. Thanks for your help. – Brownd92 Sep 09 '15 at 09:51

0 Answers0