I wonder if someone can point me in the right direction regarding printing a canvas multiple times.
My project is to be able to print barcode labels and text with a Zebra label printer from a custom database.
I have put a canvas on my layout, and populate it with the g.drawstring command, utilizing the free 3 of 9 font.
This works fine if I only want to print a single barcode label, but I am at a loss as to how to print multiple copies of the same label.
Even using the print dialogue number of copies only prints a single label.
The following code is from my print button Action Event, please be kind on my coding, not a lot of printing examples around
Dim settings As String
Dim p as new Picture(200,75,32)
Dim g as Graphics
Dim ps As PrinterSetup
ps = New PrinterSetup
dim i as Integer
//Check if the Page Setup has been previously selected this launch and stored in App.psSettings
if app.psSettings ="" then
If ps.PageSetupDialog Then
settings = ps.SetupString
End If
app.psSettings = settings //Store Printer Settings in App Property
end if
//If page setup has been set this launch, set the ps.SetupString with the information
ps.SetupString = app.psSettings
// open the printer dialog, get the graphics class and prints using the settings from ps
g = OpenPrinterDialog(ps)
// if it’s not nil
If g <> Nil Then
//check if number of prints is greater than 1 and loop accordingly
if val(popupNumberOfLabels.text) > 1 then
for i = 1 to val(popupNumberOfLabels.text)
buildbarcode(g)
next
else
buildbarcode(g)
end if
else
MsgBox “Printing Cancelled”
End If
Hoping someone understands my needs.
Robert