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
|
Imports Microsoft.VisualBasic.PowerPacks
Public Class Form1
Private ln As New LineShape()
Private ellipse As New OvalShape
Private ct As ShapeContainer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ct = New ShapeContainer()
ct.Location = New Point(50, 50)
ln.BorderColor = Color.Red
ln.BorderWidth = 2
ln.EndPoint = New Point(200, 120)
ln.StartPoint = New Point(100, 50)
ct.Shapes.Add(ln)
ellipse.BackColor = Color.Magenta
ellipse.BorderColor = Color.Red
ellipse.BorderStyle = Drawing2D.DashStyle.DashDot
ellipse.Height = 100
ellipse.Width = 120
ellipse.Location = New Point(140, 50)
ct.Shapes.Add(ellipse)
Me.Controls.Add(ct)
End Sub
End Class |
Partager