在graphics.drawstring VB中引用条形码字体

时间:2015-09-09 08:40:22

标签: vb.net drawstring

如何在graphics.drawstring中引用条形码字体? 到目前为止这是我的代码。它打印的文字不是条形码:

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

有什么想法吗?

由于

0 个答案:

没有答案