Equivalent syntaxique c# de 'Printer.CurrentY' ?
Salut,
J'aurais besoin pour la migration d'une partie d'un projet VB6 en c# de connaitre l'équivalent de 'Printer.CurrentY' ?
Cela concerne un projet d'impression ou plus précisément ce petit morceau de code que je n'arrive pas à translater :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Dim y As Long
For i = 1 To 999
y = Printer.CurrentY
On Error Resume Next
Printer.Print "." & i & "."; String(10, "-")
If Printer.CurrentY - y < 0 Then
Printer.EndDoc
MsgBox (i - 1 & " lignes ont été imprimées avant un changement de page !"), vbMsgBoxSetForeground
Exit Sub
End If
Next i
i = MsgBox("Il y a 999 lignes sans changement de pages !", vbExclamation Or vbMsgBoxSetForeground, "Erreur possible ?")
Printer.EndDoc |