Below is some code that I used to create rounded edges earlier, using AddArc and lines to combine the border:
(You can play with xRadius and yRadius to achieve the desired amount of rounding)
int xRadius = {insert value here}; int yRadius = {insert value here}; GraphicsPath edge = new GraphicsPath(); int rightHandLeft = this.Width - xRadius - 1; int bottomSideTop = this.Height - yRadius - 1; edge.AddArc(0, 0, xRadius, yRadius, 180, 90); edge.AddLine(xRadius, 0, rightHandLeft, 0); edge.AddArc(rightHandLeft, 0, xRadius, yRadius, 270, 90); edge.AddLine(this.Width, yRadius, this.Width, bottomSideTop); edge.AddArc(rightHandLeft, bottomSideTop, xRadius, yRadius, 0, 90); edge.AddLine(rightHandLeft, this.Height, xRadius, this.Height); edge.AddArc(0, bottomSideTop, xRadius, yRadius, 90, 90); edge.AddLine(0, bottomSideTop, 0, yRadius); this.Region = new Region(edge);
Zach johnson
source share