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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim police As New Font("Arial", 9, FontStyle.Regular)
Dim xpos, ypos As Integer
Dim stexte As String
Dim pagenumber As Integer = 0
Select Case pagenumber
Case 0
xpos = 10
ypos = 10
e.Graphics.DrawString("Hydrolyse du chlorure de tertio butyle", police, Brushes.Black, xpos, ypos)
ypos = ypos + 20
e.Graphics.DrawString("conditions opératoire :", police, Brushes.Black, xpos, ypos)
ypos += 20
xpos += 25
stexte = Label1.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label2.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label3.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label4.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label5.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label6.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 40
xpos -= 25
e.HasMorePages = True
Case 1
xpos = 10
ypos = 10
e.Graphics.DrawString("Hydrolyse du chlorure de tertio butyle", police, Brushes.Black, xpos, ypos)
ypos = ypos + 20
e.Graphics.DrawString("conditions opératoire :", police, Brushes.Black, xpos, ypos)
ypos += 20
xpos += 25
stexte = Label1.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label2.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label3.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label4.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label5.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label6.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 40
xpos -= 25
e.HasMorePages = True
Case 2
xpos = 10
ypos = 10
e.Graphics.DrawString("Hydrolyse du chlorure de tertio butyle", police, Brushes.Black, xpos, ypos)
ypos = ypos + 20
e.Graphics.DrawString("conditions opératoire :", police, Brushes.Black, xpos, ypos)
ypos += 20
xpos += 25
stexte = Label1.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label2.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label3.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label4.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label5.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 15
stexte = Label6.Text
e.Graphics.DrawString(stexte, police, Brushes.Black, xpos, ypos)
ypos += 40
xpos -= 25
e.HasMorePages = False
End Select
pagenumber += 1
End Sub |
Partager