Gentlemen,
I use the sub below to print the application help manual. The problem is that it stops printing after the first page. How can I fix this so it will print the next page or until nothing more to print. The help manual is about a page and a half.
Please help.
blumonde
PrivateSub document_PrintPage(ByVal sender AsObject, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles docToPrint.PrintPage
' Insert code to render the page here.
Dim sHelptoprint AsString
sHelptoprint = Me.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf & Me.mtxHelp.Text
' The following code will render a simple
' message on the printed document.
Dim text AsString = sHelptoprint
Dim printFont AsNew System.Drawing.Font _
("Arial", 9, System.Drawing.FontStyle.Regular)
' Draw the content.
e.Graphics.DrawString(text, printFont, _
System.Drawing.Brushes.Black, 10, 10)
EndSub
I use the sub below to print the application help manual. The problem is that it stops printing after the first page. How can I fix this so it will print the next page or until nothing more to print. The help manual is about a page and a half.
Please help.
blumonde
PrivateSub document_PrintPage(ByVal sender AsObject, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles docToPrint.PrintPage
' Insert code to render the page here.
Dim sHelptoprint AsString
sHelptoprint = Me.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf & Me.mtxHelp.Text
' The following code will render a simple
' message on the printed document.
Dim text AsString = sHelptoprint
Dim printFont AsNew System.Drawing.Font _
("Arial", 9, System.Drawing.FontStyle.Regular)
' Draw the content.
e.Graphics.DrawString(text, printFont, _
System.Drawing.Brushes.Black, 10, 10)
EndSub
Last edited: