1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Private Sub Prt_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
Grp = e.Graphics
If i = 1 Then
DessinerPage1()
i = 2 : e.HasMorePages = True
ElseIf i = 2 Then
DessinerPage2()
i = 3 : e.HasMorePages = True
ElseIf i = 3 Then
DessinerPage3()
e.HasMorePages = False
End If
End Sub
Private Sub DessinerPage1()
Dim Fnt As New Font("Times New Roman", 10, FontStyle.Regular)
Dim Pnc As New SolidBrush(Color.Black)
Dim Pnt As New PointF(100, 200)
Grp.DrawString("Toto, manges ta soupe,", Fnt, Pnc, Pnt)
End Sub
Private Sub DessinerPage2()
Dim Fnt As New Font("Times New Roman", 10, FontStyle.Regular)
Dim Pnc As New SolidBrush(Color.Black)
Dim Pnt As New PointF(100, 200)
Grp.DrawString("et tu grandiras.", Fnt, Pnc, Pnt)
End Sub
Private Sub DessinerPage3()
Dim Fnt As New Font("Times New Roman", 10, FontStyle.Regular)
Dim Pnc As New SolidBrush(Color.Black)
Dim Pnt As New PointF(100, 200)
Grp.DrawString("Nan, j'ai pas faim.", Fnt, Pnc, Pnt)
End Sub |
Partager