Thank you all for replying. I managed to get it going using this code
sample:
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Rectangle borderRectangle = this.ClientRectangle;
borderRectangle.Inflate(-10, -10);
ControlPaint.DrawBorder(e.Graphics, borderRectangle,
System.Drawing.Color.Black, 1,
System.Windows.Forms.ButtonBorderStyle.Solid,
System.Drawing.Color.Black, 1,
System.Windows.Forms.ButtonBorderStyle.Solid,
System.Drawing.Color.Black, 1,
System.Windows.Forms.ButtonBorderStyle.Solid,
System.Drawing.Color.Black, 1,
System.Windows.Forms.ButtonBorderStyle.Solid);
}
I have one last question though. The top, left and bottom borders
connect fine but the left border seems to be a little off. The top and
bottom borders run past the right border by about 1 pixel. What is the
problem?