I need help on how to add curve to each corner.
this is my code..
using (Graphics btnG = pevent.Graphics)
using (SolidBrush btnBGSB = new SolidBrush(Color.FromArgb(107, 109, 110)))
using (SolidBrush lblBrush = new SolidBrush(Color.FromArgb(255, 255, 255)))
{
Rectangle btnBG = new Rectangle(0, 0, this.Width, this.Height);
btnG.FillRectangle(btnBGSB, btnBG);
RectangleF lblRec = new RectangleF(0, 0, this.Width - 1, this.Height - 1);
StringFormat lblSf = new StringFormat();
lblSf.Alignment = StringAlignment.Center;
lblSf.LineAlignment = StringAlignment.Center;
btnG.DrawString(this.Text, new Font("tahoma", 10.0f, FontStyle.Bold), lblBrush, lblRec, lblSf);
}
this is my 3rd day playing with c#.. just a GUI for my TCPSocket Application.. 🙂
here is a method I use to make rounded corners:
That way you can specify which corners you want rounded.
And if you want to have a border around it, use this method: