1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Dim x As Integer = 10
While Form4.ButtonP.Click
If Form4.TextBoxbranche1.Text = "" Then
Else
e.Graphics.DrawLine(Pens.Red, x, 40, x + 90, 40)
e.Graphics.DrawString(Form4.TextBoxbranche1.Text, Font, Brushes.Black, 40, 27)
End If
If Form4.TextBoxbranche2.Text = "" Then
Else
e.Graphics.DrawLine(Pens.Red, x, 80, x + 90, 40)
e.Graphics.DrawString(Form4.TextBoxbranche2.Text, Font, Brushes.Black, 45, 65)
End If
If Form4.TextBoxBranche3.Text = "" Then
Else
e.Graphics.DrawLine(Pens.Red, x, 0, x + 90, 40)
e.Graphics.DrawString(Form4.TextBoxBranche3.Text, Font, Brushes.Black, 45, 3)
End If
x = x + 90
End While
End Sub |
Partager