For borders you should consider responding to the non-client messages such
as WM_NCCREATE and WM_NCPAINT. These allow you to set a client size that is
different from the overall control size.
For other painting issues you can use clipping regions to limit the output
of graphics to certain areas.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Barguast" <It*****************@Email.com> wrote in message
news:49**********************************@microsof t.com...
Is there any way to restrict the area in a control that can be painted?
For
example, if I wanted to enforce a three-pixel wide border around my
control,
how would I go about it?
Thanks