G
Guest
hello all.....
I can currently print out only one page with the following code...(note it
lacks the e.hasmorepages=false)
Private Sub PrintToolStripButton_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PrintToolStripButton.Click
'Print file from the ToolStrip
Me.PrintDialog1.ShowDialog()
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
'Print Function to call
e.Graphics.DrawString(Me.RichTextBox1.Text, New Font("Courier New",
10, FontStyle.Regular), Brushes.Black, 0, 0)
End Sub
This prints out 1 pg and 1 pg only....regardless if there's more or not.
I searched dotnet.general for discussions on this subject and found out
about e.hasmorepages.....however, when I use it in my code the printpage
count thingy goes
crazy.....just multiplies (100 pages +) my printer don't like this
Can anyone shed any light on this for me? Maybe help me to print out exactly
how many pages I actually have and not 100's or just 1?
My code looks like this.....
Private Sub PrintToolStripButton_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PrintToolStripButton.Click
'Print file from the ToolStrip
Me.PrintDialog1.ShowDialog()
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
'Print Function to call
e.Graphics.DrawString(Me.RichTextBox1.Text, New Font("Courier New",
10, FontStyle.Regular), Brushes.Black, 0, 0)
e.HasMorePages = True
End Sub
Thank you much!!!!!!!!!
Brenton (long-winded) Garman
I can currently print out only one page with the following code...(note it
lacks the e.hasmorepages=false)
Private Sub PrintToolStripButton_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PrintToolStripButton.Click
'Print file from the ToolStrip
Me.PrintDialog1.ShowDialog()
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
'Print Function to call
e.Graphics.DrawString(Me.RichTextBox1.Text, New Font("Courier New",
10, FontStyle.Regular), Brushes.Black, 0, 0)
End Sub
This prints out 1 pg and 1 pg only....regardless if there's more or not.
I searched dotnet.general for discussions on this subject and found out
about e.hasmorepages.....however, when I use it in my code the printpage
count thingy goes
crazy.....just multiplies (100 pages +) my printer don't like this
Can anyone shed any light on this for me? Maybe help me to print out exactly
how many pages I actually have and not 100's or just 1?
My code looks like this.....
Private Sub PrintToolStripButton_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PrintToolStripButton.Click
'Print file from the ToolStrip
Me.PrintDialog1.ShowDialog()
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
'Print Function to call
e.Graphics.DrawString(Me.RichTextBox1.Text, New Font("Courier New",
10, FontStyle.Regular), Brushes.Black, 0, 0)
e.HasMorePages = True
End Sub
Thank you much!!!!!!!!!
Brenton (long-winded) Garman