tags:

views:

632

answers:

3

draw rectangle using c# and i need to draw the arc in every edges first of all i draw rectangle and then i need click button it will draw the arc at edges, how can i do it?

+1  A: 

first draw the four lines, and draw the arc at the 4 corners.

Benny
+3  A: 

The graphics class in C# does not have a built-in method to draw rounded rectangles, however there are several ways that you can accomplish this affect. The links in the answer by Jay Riggs offer good suggestions on where to start, additionally I would suggest that you check out this article:

C# - Creating Rounded Rectangles Using A Graphics Path

So first, we create a GraphicsPath, and then we call StartFigure so that we can start adding edges to the path. The rest of this code is for the top left corner and the top line of the rounded rectangle. If we are supposed to make this corner rounded, we add an arc - otherwise...

instanceofTom