Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to create a circle Middle of the Form.
When I Click the Button Single time Circle Size should be Increased upto Form Size. Around circle Numbers should be display along with circle size.

2
Ex : 1
2 1 Circle 1 2
1
2
Posted
Updated 14-Mar-12 1:48am
v2

1 solution

Here is the sample code to draw circle with point and radius. Using this function, you can draw centre and full circle based on the screen resolution.

VB
Private Sub DrawCircle(ByVal cp As Point, ByVal radius As Integer)
      Dim gr As Graphics
      gr = Panel1.CreateGraphics
      Dim rect As Rectangle = New Rectangle(cp.X - radius, cp.Y - radius, 2 * radius, 2 * radius)
      gr.DrawEllipse(Pens.Black, rect)

  End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900