|
-
Nov 28th, 2002, 07:35 PM
#1
Thread Starter
Lively Member
printing
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?
-
Nov 29th, 2002, 01:24 AM
#2
PowerPoster
-
Nov 29th, 2002, 10:56 AM
#3
Thread Starter
Lively Member
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.
-
Nov 29th, 2002, 11:36 AM
#4
Registered User
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....
Code:
pdoc.PrinterSettings.Copies = CType(TextBox1.Text, Short)
pdoc.Print()
... and that generated the amount of copies written in TextBox1.
-
Nov 29th, 2002, 03:55 PM
#5
Thread Starter
Lively Member
what is the textbox1.text refering to? (The Printdialog number of copies textbox?)
-
Nov 29th, 2002, 04:01 PM
#6
Registered User
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?
-
Nov 29th, 2002, 04:07 PM
#7
Registered User
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
Sorry, but I probably missunderstodd you....
Last edited by Athley; Nov 29th, 2002 at 04:15 PM.
-
Nov 29th, 2002, 07:04 PM
#8
Thread Starter
Lively Member
Thanks thats exactly what I was looking for!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|