I am in my Visual Basic Class and when I draw a circle or any other objects with their dimensions, it cuts off. I know it is supposed to work, but it still cuts off.
Its frustrating has my instructor wants us to make a shape the size of the monitor, or at the minimum of 800 x 600.
Here is the code I currently have:
Its frustrating has my instructor wants us to make a shape the size of the monitor, or at the minimum of 800 x 600.
Here is the code I currently have:
Code:
Public Class Form1
Dim myGraphics As Graphics = Me.CreateGraphics
Dim myPen As Pen
Dim myBrush As Brush
Dim myRectangle As New Rectangle
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub btnDraw_Click(sender As Object, e As EventArgs) Handles btnDraw.Click
myPen = New Pen(Drawing.Color.Blue, 5)
myBrush = New SolidBrush(Color.Coral)
myRectangle.X = 100
myRectangle.Y = 100
myRectangle.Width = 200
myRectangle.Height = 200
myGraphics.DrawEllipse(myPen, myRectangle)
End Sub
End Class
Comment