Please Can't understand how to use HasMorepages. I spent a lot of time on this task. but I have no result.
For examle I want to print every 45 record on each new page.
Please Rewrite the following code in correct manner.
I dont know where to place HasmorePages=tr ue and HasmorePages=fa lse
For examle I want to print every 45 record on each new page.
Please Rewrite the following code in correct manner.
I dont know where to place HasmorePages=tr ue and HasmorePages=fa lse
Code:
Private Sub Pr_PrintReg(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pr.PrintPage Dim gr As Graphics = e.Graphics Dim i As Int32 For i = 1 To 200 If i Mod 45 = 0 Then e.HasMorePages = True gr.DrawString(i.ToString + " Square is - " + (i ^ 2).ToString, New Font("arial", 12), Brushes.Black, 100, (i Mod 45) * 25 + 50) Next e.HasMorePages = False End sub
Comment