I want to make my button, form, textbox and groupbox a bit round from edges. I tried this,
GraphicsPath mygp = new GraphicsPath();
Graphics mygr = this.CreateGraphics();
Pen myp = new Pen(Color.Black, 1);
mygp.AddArc(400, 10, 30, 30, 180, 90);
mygp.AddArc(600, 10, 30, 30, 270, 90);
mygp.AddArc(600, 200, 30, 30, 0, 90);
mygp.AddArc(400, 200, 30, 30, 90, 90);
mygr.FillPath(Brushes.Black, mygp);
mygr.DrawPath(myp, mygp);
it makes a block with round edges. But I want my button etc to have rounded edge.
Please help me.
I think the most appropreate way is to write your code in OnPaint event which enables you draw the button by yourself. In following link you will find a good solution using same kind of approach.
http://www.codeproject.com/Articles/15730/RoundButton-Windows-Control-Ever-Decreasing-Circle