I have been given a Vb.Net Bar code program written by former developer in VS 2008 VB.Net. I have been tasked to add another field( Date Received) generating the barcode. I have included the field. The print preview shows the Date received date itself. It's not generating any bar code. The problem is , It is not generating the bar code for any of the other fields also which was coded earlier..
- I have downloaded the font 3 of 9
- I have included the * in the beginning and end of the filed to generate barcode.
I have added all the libraries needed.( System,Drawing, text, Printing)`
Can you please point me ways to debug, why it is not generating the BARCODE?
Snippet of the code:
DateReceived = Mid$(lines(10), 23, 10)
DateReceivedBC = "*" & DateReceived & "*"
printFont = New Font("3 of 9 Barcode", 20)
printFont2 = New Font("arial", 12)
printFont3 = New Font("arial black", 18)
ev.Graphics.DrawString("Date Recieved", printFont6, Brushes.Black, 375, 940, New StringFormat)
ev.Graphics.DrawString(DateReceivedBC, printFont, Brushes.Black, 345, 950, New StringFormat)
ev.Graphics.DrawString(DateReceived, printFont2, Brushes.Black, 375, 975, New StringFormat)
Dim pd As New PrintDocument
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
'
'set printer
'Empl = pd.PrinterSettings.DefaultPageSettings.PaperSource.SourceName()
'
'MessageBox.Show(Empl)
pd.DocumentName = Empl & " Bar Code Sheets"
pd.PrinterSettings.PrinterName = PrinterName
pd.PrinterSettings.Copies = 1
'print
PrintPreviewDialog1.Document = pd