PC Review


Reply
Thread Tools Rate Thread

draw a border for a derived control

 
 
gupta
Guest
Posts: n/a
 
      5th Aug 2003
I have derived a control from Control class and I would like to draw a
border. If I draw a border using ClientSize or ClientRectangle then controls
inside of it hides it. I have to either draw it in NON-CLIENT area or modify
the client area so other controls can not hide it.

Does anyone know how to do this in .NETCF?

Anil


 
Reply With Quote
 
 
 
 
Claes Bergefall
Guest
Posts: n/a
 
      6th Aug 2003
I haven't used CF by in normal .NET you would override
the CreateParams property and add 0x200 to ExStyle.
That would give you the normal 3D border that's
around textboxes, listboxes etc. There is no need to
draw anything and the ClientRectangle is still correct

In VB it looks like this:

Protected Overrides ReadOnly Property CreateParams() As
System.Windows.Forms.CreateParams
Get
Dim params As CreateParams = MyBase.CreateParams
params.ExStyle = params.ExStyle Or &H200
Return params
End Get
End Property

"gupta" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have derived a control from Control class and I would like to draw a
> border. If I draw a border using ClientSize or ClientRectangle then

controls
> inside of it hides it. I have to either draw it in NON-CLIENT area or

modify
> the client area so other controls can not hide it.
>
> Does anyone know how to do this in .NETCF?
>
> Anil
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView: draw only a border for selected row Roberto Microsoft Dot NET Framework Forms 0 15th Apr 2008 01:12 AM
Report Border - How do I draw one in VBA? =?Utf-8?B?RGVubmlz?= Microsoft Access Reports 8 27th Jan 2006 10:23 PM
How do you draw a border around a scrollable control Phill Microsoft Dot NET 0 18th Nov 2004 06:10 PM
How do I draw a color border on a Panel control Patrick Blackman Microsoft C# .NET 1 1st Jul 2004 07:44 AM
draw a border for a derived control gupta Microsoft Dot NET Compact Framework 2 6th Aug 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.