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 35
| For i = 3 To fin
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics))
'Ecrit le texte dans l'objet graphique
ev.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, _
yPos, New StringFormat())
If (i < lpp) Then
If i = 3 Then
FileGet(100, enregliste, 3)
line = enregliste.text1
End If
If i = 4 Then
FileGet(100, enregliste, 4)
line = enregliste.text1
End If
If i >= 5 Then
FileGet(100, enregliste, i)
line = " " + Trim(CStr(enregliste.num)) + " " + Trim(CStr(enregliste.annee))
End If
End If
count = count + 1
'S'il y a encore des lignes, on réimprime une page
If count > lpp Then
ev.HasMorePages = True
count = 2
Else
ev.HasMorePages = False
End If
Next i |
Partager