Potreboval som niečo také:
Public Class Form1
Dim PageNumber As Integer = 0
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(sender As System.Object, e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim reportFont As New Font("Arial", 12, FontStyle.Regular)
Select Case PageNumber
Case 0
e.Graphics.DrawString("First", reportFont, Brushes.Black, 100, 100)
e.HasMorePages = True
Case 1
e.Graphics.DrawString("Second", reportFont, Brushes.Black, 100, 100)
e.HasMorePages = True
Case 2
e.Graphics.DrawString("Third", reportFont, Brushes.Black, 100, 100)
e.HasMorePages = False
End Select
PageNumber += 1
End Sub
End Class
|