|
-
Jan 13th, 2004, 11:21 PM
#1
Thread Starter
Addicted Member
Printing Copies [Resolved]
I am just angry
I have been looking all over **** for the correct way to do this, and found NOTHING!!
Please help!
This is my code:
Code:
Private Sub printboards()
AddHandler pd1.PrintPage, AddressOf pd1_PrintPage
pd1.PrinterSettings.Copies = PrintDialog1.PrinterSettings.Copies
pd1.Print()
End Sub
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
PrintDialog1.Document = pd1
If PrintDialog1.ShowDialog = DialogResult.OK Then
printboards()
End If
End Sub
Private Sub pd1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pd1.PrintPage
e.Graphics.Clear(Color.White)
Dim x1 As Integer
Dim y1 As Integer
Dim x2 As Integer
Dim y2 As Integer
Dim left As Integer
Dim horz As Integer
Dim top1 As Integer = 200
Dim vert As Integer
For vert = 0 To 2
For horz = 0 To 1
e.Graphics.DrawString("Week " & week + 1, New Font("Arial", 12, FontStyle.Bold), Brushes.Red, 70 + left, top1)
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is Label Then
Dim lbl As Label = ctl
e.Graphics.DrawString(lbl.Text, New Font("Arial", 8, FontStyle.Regular), Brushes.Black, lbl.Left + 50 + left, lbl.Top + top1)
End If
Next
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
Dim txt As TextBox = ctl
e.Graphics.DrawString(txt.Text, New Font("Arial", 9, FontStyle.Bold), Brushes.Blue, txt.Left + 55 + left, txt.Top + top1)
End If
Next
week = week + 1
Me.btnRegen.PerformClick()
left = left + 400
Next
left = 0
Me.btnRegen.PerformClick()
top1 = top1 + 300
pagecount += 1
Next
If pagecount = 3 Then
e.HasMorePages = True
ElseIf pagecount = 6 Then
e.HasMorePages = True
Else
e.HasMorePages = False
week = 0
pagecount = 0
End If
End Sub
What am I missing in order to print multiple copies?
Any Help Would Be Greatly Appriciated
Last edited by Hole-In-One; Jan 28th, 2004 at 08:32 AM.
-
Jan 13th, 2004, 11:28 PM
#2
Thread Starter
Addicted Member
Nevermind.
I just figured it out!
The problem is not in the code, but the piece of **** hp printer I'm using that doesn't allow multiple copies!
I tried using notepad to print a couple of copies of a text document and it only printed one.
-
Jan 13th, 2004, 11:38 PM
#3
How does a specific printer not allow multiple pages? It just sends the print command for the page extra times.....
I've never seen a printer not allow multiple copies, even my old Panasonic dot matris printer did it, and that was from like 1994!
-
Jan 14th, 2004, 04:18 AM
#4
To find out if your printer can cope with multiple copes use the DeviceCapabilities API call with the index DC_COPIES. If this returns 1 then you will need to implement the multiple copies functionality yourself.
-
Jan 22nd, 2004, 08:44 PM
#5
Thread Starter
Addicted Member
If this returns 1 then you will need to implement the multiple copies functionality yourself.
And how do I do that?
-
Jan 22nd, 2004, 08:47 PM
#6
Originally posted by Hole-In-One
And how do I do that?
Print it more than once
-
Jan 22nd, 2004, 09:14 PM
#7
Thread Starter
Addicted Member
Yeah but then it brings up that stupid "print document" screen that many times!
(Looks like **** )
You wouldn't happen to know a way to lose that screen would ya?
-
Jan 28th, 2004, 07:39 AM
#8
Lively Member
if you set the background printing on then it doesn't show
my system prints several doc's one after the other but the user never sees the print dialog box.
-
Jan 28th, 2004, 08:31 AM
#9
Thread Starter
Addicted Member
Thanks for all the feedback.
I have resolved this problem. I upgraded to 2003 and it works wonderful.
The framework 1.0 has a bug in it, obviously the framework 1.1 doesn't.
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
|