|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Restricting the 'paintable' areas of a controlIs 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 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. -- Show quoteHide quoteBob 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" <ItsLikeMadeUpNSt***@Email.com> wrote in message news:49B3C1BE-14DD-4B0A-8E69-5984034BF47C@microsoft.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
Other interesting topics
get the actual size of a file
(decimal) 1.1 versus 1.1M datatable.select problem how to get count of items in listbox? Writing to TextBox from Seperate Clas Redux mshtml - GETBLOCKFMTS Setup: How to change the "Welcome to the MyApp Setup Wizard" text? double trip through an event 2 threads, 1 GUI, 1 tcp client... 1 bug Does anyone help me convert vb.net to c# |
|||||||||||||||||||||||