954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Adding Graphic objects to Groupbox

Hi Guys,

i have this code which draws a continuous circle using a timer.
Now I have to display it in the form which has a group box with loads of other
fields and information. Now can anyone please tell me how can i add the circle
into the group box as it can be displayed. Currently the circle is being displayed
behind the group box which is not visible.

Thank you so much

Ashwin

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
	Me.sweepAngle += 1
        If Me.sweepAngle = 360 Then
		Me.Timer1.Stop()
        End If
        Me.Refresh()
End Sub



Private Sub Form1_Paint(ByVal sender As Object, _
             ByVal e As PaintEventArgs) Handles Me.Paint
	e.Graphics.DrawPie(Pens.Black, 150, 0, 48, 48, 90, Me.sweepAngle)
	'me.groubox1.content.add(???)
End Sub
ashwinshenoy
Newbie Poster
18 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

Move your code from Form1_Paint eventto GroupBox1_Paint event.

codeorder
Posting Virtuoso
1,913 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384
 

Thank you so much .. that was fantastic


cheers
Ashwin

ashwinshenoy
Newbie Poster
18 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: