|
-
Aug 21st, 2003, 07:41 PM
#1
Thread Starter
Registered User
Printing with PrintDocument [Resolve]
I had added a PrintDocument to my Project to print something on A4 paper.
This is the code:
Code:
Private Sub PrintDocument_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument.PrintPage
Dim intY As Integer = 158
'Print cash
e.Graphics.DrawString("/", New Font("Courier New", 10, FontStyle.Bold), Brushes.Black, 165, intY - 20)
'Print cheque
e.Graphics.DrawString("/", New Font("Courier New", 10, FontStyle.Bold), Brushes.Black, 165, intY)
'Print cheque number
e.Graphics.DrawString("123456", New Font("Courier New", 12, FontStyle.Bold), Brushes.Black, 315, intY - 4)
'Print amount
e.Graphics.DrawString("12345.00", New Font("Courier New", 12, FontStyle.Bold), Brushes.Black, 440, intY)
'Print number of employees
e.Graphics.DrawString("123", New Font("Courier New", 12, FontStyle.Bold), Brushes.Black, 580, intY)
End Sub
Using the above codes, it will print everything on 1 piece of A4 paper on the specific (x, y) coordinate.
My question is, if i have very very long information to be printed, and requires it to be printed on 2nd, 3rd, 4th, 5th pages and etc... How should i specific its (x, y) coordinate?
Please guide me, thank you!
Last edited by albertlse; Aug 25th, 2003 at 04:03 AM.
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
|