Hi,
I've made a CustomPanel derived from the Panel class.
How can I set my own size of the "client area" of that CustomPanel ?
("client area" = Size of the rectangle in which one can drop controls from
the toolbox, or place a control by code)
Because of the large border, some control too close of the border are on
top the border. I would like to prevent user to drop control where the
border is drawn.
Thanks for help !
Steph. 3 2631
You would have to override the WndProc method in your derived class and
handle the WM_NCCALCSIZE (0x83) message.
I haven't evaluated the entire code base; but, the CodeProject project
Themed RichTextBox ( http://www.codeproject.com/cs/miscct...hTextBoxEx.asp)
is an example of doing this.
-- http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"TheSteph" wrote:
Hi,
I've made a CustomPanel derived from the Panel class.
How can I set my own size of the "client area" of that CustomPanel ?
("client area" = Size of the rectangle in which one can drop controls from
the toolbox, or place a control by code)
Because of the large border, some control too close of the border are on
top the border. I would like to prevent user to drop control where the
border is drawn.
Thanks for help !
Steph.
Thanks for your reply and the Link !
I have another question :
Except very simple controls like aggregate of existing controls and
"client area painting", what is the best way to make CustomControl to be
used in .NET ? Is it to make it in C++ and then write a wrapper class in
..NET ?
Steph.
"Peter Ritchie [MVP]" <PR****@newsgroups.nospamwrote in message
news:76**********************************@microsof t.com...
You would have to override the WndProc method in your derived class and
handle the WM_NCCALCSIZE (0x83) message.
I haven't evaluated the entire code base; but, the CodeProject project
Themed RichTextBox
( http://www.codeproject.com/cs/miscct...hTextBoxEx.asp)
is an example of doing this.
-- http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"TheSteph" wrote:
Hi,
I've made a CustomPanel derived from the Panel class.
How can I set my own size of the "client area" of that CustomPanel ?
("client area" = Size of the rectangle in which one can drop controls
from
the toolbox, or place a control by code)
Because of the large border, some control too close of the border are
on
top the border. I would like to prevent user to drop control where the
border is drawn.
Thanks for help !
Steph.
You can write custom controls in any .NET language you like--which is what
I'd recommend if you want to consume then in a .NET application.
If you want to aggregate one or more existing controls then I suggest
deriving from UserControl.
If you want to create a control that performs painting entirely itself, I
suggest deriving from Control. Or Button, if you want to handle mouse
clicks--it makes life a little easier.
-- http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"TheSteph" wrote:
Thanks for your reply and the Link !
I have another question :
Except very simple controls like aggregate of existing controls and
"client area painting", what is the best way to make CustomControl to be
used in .NET ? Is it to make it in C++ and then write a wrapper class in
..NET ?
Steph.
"Peter Ritchie [MVP]" <PR****@newsgroups.nospamwrote in message
news:76**********************************@microsof t.com...
You would have to override the WndProc method in your derived class and
handle the WM_NCCALCSIZE (0x83) message.
I haven't evaluated the entire code base; but, the CodeProject project
Themed RichTextBox
(http://www.codeproject.com/cs/miscct...hTextBoxEx.asp)
is an example of doing this.
-- http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"TheSteph" wrote:
Hi,
>
I've made a CustomPanel derived from the Panel class.
>
How can I set my own size of the "client area" of that CustomPanel ?
>
("client area" = Size of the rectangle in which one can drop controls
from
the toolbox, or place a control by code)
>
Because of the large border, some control too close of the border are
on
top the border. I would like to prevent user to drop control where the
border is drawn.
>
Thanks for help !
>
Steph.
>
>
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: polarpolar |
last post by:
Hi, All :
I wrote a simple server in Python,
and I can get the client IP by following script:
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
s.bind( (HOST, PORT) )
s.listen(1)...
|
by: Cave |
last post by:
Is there a way to install the SQL Reporting Services Client on Whidbey
?
The installer searches the system for an installation of Visual Studio
2003 in order to install the client part of SQL RPS....
|
by: Ron |
last post by:
I've an aspx page with a custom (composite) server control and a
TextBox, both with RequiredFieldValidators. I'd like the custom
control to behave the same way the default TextBox does when one...
|
by: walter |
last post by:
Hi , when I apply expression on a pure HTML control , like<img src=<%$
resources:...% > , I got a compilation error and said this is not allowed
,after I add "runat=server", the problem is...
|
by: Jason Ho |
last post by:
Hi All,
In web page, we can make a HTML Area text box for user to input content
(e.g. text, font size, picture) and switch to HTML code with some WYSIWYG
control.
I am writing a VB.NET...
|
by: Jean-François Michaud |
last post by:
Hello,
I was wondering if there was a way around leader-alignment. XSF V3.4
from Antenna House seems to be a very powerful FO -> PDF converter, but
it doesn't support this particular attribute...
|
by: Usha |
last post by:
Using the Input control form for uploading a file to an IIS/ASP.net server.
How can I check the file size on the client using javascript prior to posting the form and file for upload?
I want to...
|
by: gelangov |
last post by:
I am trying to bulk load a flat file into a SQL server table (2005)
using the integration services. I got the following error:
] Error: An OLE DB error has occurred. Error
code: 0x80004005. An...
|
by: \(O\)enone |
last post by:
I've added a TabControl to my WinForms app, and added a couple of tabs to
the control.
The result is that the top strip of the TabControl contains the two tabs,
and then to the right of them is...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |