The simplest way to achieve this is to place one Panel inside another Panel,
set the inside Panel to be slightly smaller (by the desired border
thickness), and then set the BackColor of the outside Panel to the desired
border color.
The other way to achieve this is through p/invokes.
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/msg/9716222d161a6e52?hl=en
--
Tim Wilson
.NET Compact Framework MVP
"Showjumper" <dfgkjhdf> wrote in message
news:OttZc2UD...@TK2MSFTNGP11.phx.gbl...
Cheers
Simon.
"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
news:eR8PFHWD...@TK2MSFTNGP15.phx.gbl...
panel1.Paint+=new PaintEventHandler(panel1_Paint);
private void panel1_Paint(object sender, PaintEventArgs e)
{
Rectangle rc = new Rectangle(0, 0, panel1.Width - 1, panel1.Height - 1);
e.Graphics.DrawRectangle(new Pen(Color.Black), rc);
}
--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org