How can i print multiple pages? In my form i have textboxes with their corresponding labels eg. (id, name, course, etc.) but the problem is 1 page is not enough to display all textboxes. i have to add another page to display the remaining textboxes with their labels. I tried to set e.hasmorepages to true but the textboxes appears in the second page are just the same with the first page it does not continue.
Here is my code :
Private Sub printSisDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printSisDoc.PrintPage
Dim labelFont As New Font("Arial", 11, FontStyle.Bold)
Dim textFont As New Font("Arial", 11, FontStyle.Regular)
Dim headerFont As New Font("Arial", 12, FontStyle.Bold)
e.Graphics.DrawString(lblGrade.Text, headerFont, Brushes.Black, 650, 660)
e.Graphics.DrawString(grade11.Text, textFont, Brushes.Black, 660, 690)
e.Graphics.DrawString(underline.Text, labelFont, Brushes.Black, 643, 692)
e.Graphics.DrawString(grade12.Text, textFont, Brushes.Black, 660, 715)
e.Graphics.DrawString(grade13.Text, textFont, Brushes.Black, 660, 740)
e.Graphics.DrawString(grade14.Text, textFont, Brushes.Black, 660, 765)
e.Graphics.DrawString(grade15.Text, textFont, Brushes.Black, 660, 790)
e.Graphics.DrawString(grade16.Text, textFont, Brushes.Black, 660, 815)
e.Graphics.DrawString(grade17.Text, textFont, Brushes.Black, 660, 840)
e.Graphics.DrawString(grade18.Text, textFont, Brushes.Black, 660, 865)
e.Graphics.DrawString(grade19.Text, textFont, Brushes.Black, 660, 890)
e.Graphics.DrawString(grade20.Text, textFont, Brushes.Black, 0, 1500)
mPageNumber += 1
e.HasMorePages = (mPageNumber <= 2)
End Sub