I am porting my old VB6 program that moves circles around the screen.
I used the Shape object from VB Power Pack.
I have an array of circles.
I move them using .top and .left, check their locations, set the .visible property, etc.
I can draw a circle in VB.NET
but how do I manipulate it like an object?
I used the Shape object from VB Power Pack.
I have an array of circles.
I move them using .top and .left, check their locations, set the .visible property, etc.
I can draw a circle in VB.NET
but how do I manipulate it like an object?
Code:
Dim myPen As Pen
myPen = New Pen(Drawing.Color.DarkTurquoise, 5)
Dim myGraphics As Graphics = Me.CreateGraphics
Dim myRectangle As New Rectangle
myRectangle.X = 90
myRectangle.Y = 30
myRectangle.Width = 100
myRectangle.Height = 100
myGraphics.DrawEllipse(myPen, myRectangle)