Private Sub Form1_Paint(ByVal sender As Object, ByVal e As _
System.Windows.Forms.PaintEventArgs) Handles _
MyBase.Paint
DrawStuff(e.Graphics)
e.Graphics.SmoothingMode = _
Drawing2D.SmoothingMode.AntiAlias
e.Graphics.TranslateTransform(0, 80)
DrawStuff(e.Graphics)
End Sub
Private Sub DrawStuff(ByVal gr As Graphics)
Dim pts() As Point = { _
New Point(20, 10), _
New Point(110, 30), _
New Point(70, 60), _
New Point(50, 40), _
New Point(10, 70) _
}
gr.DrawPolygon(Pens.Black, pts)
gr.DrawEllipse(Pens.Black, 120, 10, 100, 50)
gr.FillEllipse(Brushes.Black, 230, 10, 100, 50)
End Sub
|