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
| Declare Function GetLastError Lib "kernel32" () As Long
Const SRCCOPY = &HCC0020
Private Declare Function StretchBlt Lib "gdi32" (ByVal HDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Dim ret As Long
Dim PL As Long
Dim PT As Long
Dim PW As Long
Dim PH As Long
Dim HDC As Long
...
ici j'imprime les textes qui doivent êtres retournés; en prenant soin bien sur de calculer leur coordonnées et angle pour qu'une fois retournés il soient à l'envers (c'est à dire lisibles par transparence de l'autre côté de la feuille) mais au bon endroit
...
Printer.ScaleMode = 3
PL = Printer.ScaleLeft
PT = Printer.ScaleTop
PW = Printer.ScaleWidth
PH = Printer.ScaleHeight
HDC = Printer.HDC
ret = StretchBlt(HDC, PL, PT, PW, PH, HDC, PL, PT + PH, PW, -PH, SRCCOPY)
MsgBox Format(Ret) + vbCrLf + Format(GetLastError())
Printer.ScaleMode = 5
...
ici j'imprime le reste
... |
Partager