1 2 3 4 5 6 7 8 9
| Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(10, 10, 50, 50))
e.Graphics.DrawString("P1", New Font("Arial", 12), New SolidBrush(Color.Blue), 23, 25)
e.Graphics.DrawLine(New Pen(Color.DarkMagenta), New Point(60, 35), New Point(100, 35))
e.Graphics.DrawString("T1", New Font("Arial", 12), New SolidBrush(Color.Blue), 67, 12)
e.Graphics.FillRectangle(New SolidBrush(Color.Red), 77, 30, 2, 10)
e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(100, 10, 50, 50))
e.Graphics.DrawString("A1", New Font("Arial", 12), New SolidBrush(Color.Blue), 112, 25)
End Sub |
Partager