C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Active Directory »

How to draw circle using VB.Net


Posted Date: 02 Feb 2008    Resource Type: Code Snippets    Category: Active Directory
Author: karthikMember Level: Diamond    
Rating: 1 out of 5Points: 10



This code is used to Draw the circle in panel using VB.Net




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

Private Sub Panel1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
DrawCircle(New Point(100, 100), 50)
End Sub





Responses

Author: sandhya bhavani    06 Jun 2008Member Level: Gold   Points : 2
Hi,

Article is good.But Using paint tat circle wil arrase.
My requirement is in vb.net
i hav taken one toolstrip control.
in tat toolbox some controls like circle,arrow,rectangle(all flowchar symbols).
once i click tat circle button in toolbox it shuld be placed in panel without arrasing.using paint it is arrasing

how to achieve this problem.
If any related articles are there or if u know how to impliment
just please help me out from this problem..

from 1 month onwards im trying..i am not getting any feasible solution..

Waiting for ur response

Thanks
Sandhya.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Use Nested Repeater in ASP.NET 2.0 with C#
Previous Resource: Get all special folders
Return to Discussion Resource Index
Post New Resource
Category: Active Directory


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use