Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15107

VS 2019 VB6 Shape object. Drawing circles that can be treated as objects.

$
0
0
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?

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)


Viewing all articles
Browse latest Browse all 15107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>