I am using printdialog to print, What i need to know is how do iget the printer to print the number of copies input by the user on the printdialog form?
Printable View
I am using printdialog to print, What i need to know is how do iget the printer to print the number of copies input by the user on the printdialog form?
This link might get you started:
http://msdn.microsoft.com/library/de...ualbasic70.asp
I looked at the above but I'm still not sure where to use or place copies in my code in order to get it to print multiple copies.:confused:
I created a PrintDocument withevents called pdoc. I wrote some code for the PrintPage event, some e.graphics to have something to print. I then called the print method of the pdoc object like this....
... and that generated the amount of copies written in TextBox1.Code:pdoc.PrinterSettings.Copies = CType(TextBox1.Text, Short)
pdoc.Print()
what is the textbox1.text refering to? (The Printdialog number of copies textbox?)
It was just a textbox where to write the number of copies, but if you mean to use the built in box on the print dialog, you don't have to do anything, do you?
Sorry, but I probably missunderstodd you....Code:Private Sub btnPrintDialog_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnPrintDialog.Click
Dim dialog As New PrintDialog()
dialog.Document = pdoc
If dialog.ShowDialog = DialogResult.OK Then
pdoc.PrinterSettings.Copies = dialog.PrinterSettings.Copies
pdoc.Print()
End If
End Sub
Thanks thats exactly what I was looking for!
:)