Try setting the BorderStyle to "None" and then something like this...
protected override void OnPaint(PaintEventArgs e)
{
ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle, Color.Green,
ButtonBorderStyle.Solid);
base.OnPaint(e);
}

Signature
Tim Wilson
.NET Compact Framework MVP
Hi Tim
Thanks for the reply, your suggestion worked a treat!
I have a follow-on question. Basically same scenario, but instead of being
a UserControl, I would like to chnage the color of the border of a
SplitContainer control.
Your UserControl suggestion unfortunately doesn't work on a SpiltContainer
control :(
Craig
> Try setting the BorderStyle to "None" and then something like this...
>
[quoted text clipped - 24 lines]
> >
> > Craig
Tim Wilson - 26 May 2006 16:35 GMT
Because the SplitContainer is a control that is composed of other controls
that are docked within it (obscuring its client area in which you want to
paint), one easy way to achieve the appearance of a custom border is to
place the SplitContainer inside another Panel and then resize the
SplitContainer to be slightly smaller than the Panel. Now set the BackColor
of the Panel to the color that should be used for the border. The last step
would be to set the Anchor property for the SplitContainer to be all four
sides (Top, Bottom, Left, Right) - this will ensure that if the Panel is
resized the SplitContainer will be resized appropriately. So the outer Panel
is being used as a custom border.

Signature
Tim Wilson
.NET Compact Framework MVP
> Hi Tim
>
[quoted text clipped - 38 lines]
>> >
>> > Craig