C
Charles A. Lackman
Hello,
I am creating a print document and it works well, but how do I make the
print object only print pages 1, 2, 5?
This is how I am currently building the print function.
Private WithEvents docToPrint As New Printing.PrintDocument
Private Sub Button1_Click ....
..PrintDocumentPages(iStartPage, iLastPage, iCopies)
End Sub
Public Sub PrintDocumentPages(ByVal FirstPage As Integer, ByVal LastPage As
Integer, ByVal TheCopies As Integer)
Me.docToPrint = New Printing.PrintDocument
docToPrint.PrintController = New
System.Drawing.Printing.StandardPrintController
For I = 1 To TheCopies
CurrentPage = FirstPage
LastPage = LastPage
docToPrint.Print()
Next I
MessageBox.Show("Print Job Sent To Printer", "Print Completed",
MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub document_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles docToPrint.PrintPage
Make Graphic Object's....
End Sub
Any Assistance is greatly appreciated,
Chuck
I am creating a print document and it works well, but how do I make the
print object only print pages 1, 2, 5?
This is how I am currently building the print function.
Private WithEvents docToPrint As New Printing.PrintDocument
Private Sub Button1_Click ....
..PrintDocumentPages(iStartPage, iLastPage, iCopies)
End Sub
Public Sub PrintDocumentPages(ByVal FirstPage As Integer, ByVal LastPage As
Integer, ByVal TheCopies As Integer)
Me.docToPrint = New Printing.PrintDocument
docToPrint.PrintController = New
System.Drawing.Printing.StandardPrintController
For I = 1 To TheCopies
CurrentPage = FirstPage
LastPage = LastPage
docToPrint.Print()
Next I
MessageBox.Show("Print Job Sent To Printer", "Print Completed",
MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub document_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles docToPrint.PrintPage
Make Graphic Object's....
End Sub
Any Assistance is greatly appreciated,
Chuck