PC Review


Reply
Thread Tools Rate Thread

Adding custom controls to the Toolbox

 
 
ORC
Guest
Posts: n/a
 
      7th Dec 2004
This is my first custom control in C# (.NET) so sorry for my ignorance if
this question seems to have an obvious answer. I have made a custom control
that Inherites a TextBox. I want to add the control to the Toolbox in both
the "Normal" editor and the "Small devices" editor. How should I do that,
and is there anything I must include in my code in order to have it visible
in design mode or does the TextBox handle that?

Thank you for your help!
Ole


 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      7th Dec 2004
You need to build a design-time version of the dll which is built against
the full framework and the .NETCF designer libraries. There is an example
here by Alex Yakhnin http://www.intelliprog.com/articles/index.html
If your control derives from TextBox then you probably don't need to do any
custom drawing or similar. But you will need to go through the other steps
of adding the runtime assembly attribute, add attributes for the designer
and build against the System.CF.* dlls
You may wish to refer to the TextBoxEx code in the SDF since this derives
from TextBox and adds extra properties.
http://www.opennetcf.org/sourcebrows...rms/TextBox.cs

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

"ORC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This is my first custom control in C# (.NET) so sorry for my ignorance if
> this question seems to have an obvious answer. I have made a custom
> control
> that Inherites a TextBox. I want to add the control to the Toolbox in both
> the "Normal" editor and the "Small devices" editor. How should I do that,
> and is there anything I must include in my code in order to have it
> visible
> in design mode or does the TextBox handle that?
>
> Thank you for your help!
> Ole
>
>



 
Reply With Quote
 
ORC
Guest
Posts: n/a
 
      7th Dec 2004
Thanks!

Ole

"Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You need to build a design-time version of the dll which is built against
> the full framework and the .NETCF designer libraries. There is an example
> here by Alex Yakhnin http://www.intelliprog.com/articles/index.html
> If your control derives from TextBox then you probably don't need to do

any
> custom drawing or similar. But you will need to go through the other steps
> of adding the runtime assembly attribute, add attributes for the designer
> and build against the System.CF.* dlls
> You may wish to refer to the TextBoxEx code in the SDF since this derives
> from TextBox and adds extra properties.
>

http://www.opennetcf.org/sourcebrows...rms/TextBox.cs
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> "ORC" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > This is my first custom control in C# (.NET) so sorry for my ignorance

if
> > this question seems to have an obvious answer. I have made a custom
> > control
> > that Inherites a TextBox. I want to add the control to the Toolbox in

both
> > the "Normal" editor and the "Small devices" editor. How should I do

that,
> > and is there anything I must include in my code in order to have it
> > visible
> > in design mode or does the TextBox handle that?
> >
> > Thank you for your help!
> > Ole
> >
> >

>
>



 
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
Cannot Add Custom Controls to Toolbox SAS Microsoft Outlook Form Programming 0 25th Jun 2009 08:06 PM
cannot add custom controls to control toolbox Repent34 Microsoft Outlook Form Programming 5 12th Nov 2008 06:50 PM
How to get custom controls to show in the toolbox Torben Laursen Microsoft C# .NET 2 22nd Jun 2006 11:24 AM
Custom Controls in Toolbox =?Utf-8?B?RGVubmlz?= Microsoft C# .NET 2 18th Jul 2005 04:48 PM
Adding controls to my toolbox Justin Microsoft C# .NET 2 6th Oct 2003 07:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:48 AM.