PC Review


Reply
Thread Tools Rate Thread

Building your own controls

 
 
=?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?=
Guest
Posts: n/a
 
      8th May 2007
Hi,

I would like to build my own controls from the ground up. Just as if the
Combobox didn't excist and I wanted to create this 'new control' with all is
glorious functionality. Is there a technology used for this purpose in .net.

Regards
Jesper.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      8th May 2007
Suggestion: Before you reinvent the wheel, study how the wheel was
originally built. Get yourself a copy of Lutz Roeder's "Reflector", load the
appropriate Framework assembly, and disassemble the ComboBox class.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Jesper, Denmark" wrote:

> Hi,
>
> I would like to build my own controls from the ground up. Just as if the
> Combobox didn't excist and I wanted to create this 'new control' with all is
> glorious functionality. Is there a technology used for this purpose in .net.
>
> Regards
> Jesper.

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      8th May 2007
Jesper,

You would want to derive from the Control class in this case.

I don't know if that is exactly what you want, I get the feeling that
you are looking for tools as well to help you build your control? If that
is the case, there isn't much in VS.NET to help you with this. Because you
are building your control from the ground up, you have to handle everything,
like painting, response to mouse input, keyboard input, etc, etc.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Jesper, Denmark" <(E-Mail Removed)> wrote in message
news:E07BD747-E09B-4711-8378-(E-Mail Removed)...
> Hi,
>
> I would like to build my own controls from the ground up. Just as if the
> Combobox didn't excist and I wanted to create this 'new control' with all
> is
> glorious functionality. Is there a technology used for this purpose in
> .net.
>
> Regards
> Jesper.



 
Reply With Quote
 
Brian Schwartz
Guest
Posts: n/a
 
      8th May 2007
The ControlPaint class can help quite a bit with painting, at least. But
yes, it is entirely your responsibility to say what and when.

Of course, if you simply want a variation of an existing control, you might
be better off inheriting from it and adding the custom functionality you
want, instead of reinventing something from scratch. You can also derive
from UserControl.

--
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Fish Grid .NET Light: Powerful Layouts for Small Datasets


"Nicholas Paldino [.NET/C# MVP]" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Jesper,
>
> You would want to derive from the Control class in this case.
>
> I don't know if that is exactly what you want, I get the feeling that
> you are looking for tools as well to help you build your control? If that
> is the case, there isn't much in VS.NET to help you with this. Because
> you are building your control from the ground up, you have to handle
> everything, like painting, response to mouse input, keyboard input, etc,
> etc.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Jesper, Denmark" <(E-Mail Removed)> wrote in
> message news:E07BD747-E09B-4711-8378-(E-Mail Removed)...
>> Hi,
>>
>> I would like to build my own controls from the ground up. Just as if the
>> Combobox didn't excist and I wanted to create this 'new control' with all
>> is
>> glorious functionality. Is there a technology used for this purpose in
>> .net.
>>
>> Regards
>> Jesper.

>
>



 
Reply With Quote
 
Bruce Wood
Guest
Posts: n/a
 
      8th May 2007
On May 8, 5:44 am, Jesper, Denmark
<JesperDenm...@discussions.microsoft.com> wrote:
> Hi,
>
> I would like to build my own controls from the ground up. Just as if the
> Combobox didn't excist and I wanted to create this 'new control' with all is
> glorious functionality. Is there a technology used for this purpose in .net.


If you are doing this as a learning exercise, then I would follow
Peter's suggestion and get a copy of Reflector.

If you have a particular application in mind, then I would suggest
that this type of thing is going to be much easier in WPF / Avalon
than in the current Windows Forms as it appears in .NET. Get your
hands on a beta copy of Visual Studio Orcas and start reading up on
Windows Presentation Framework. It allows far more control over
customization of controls than does Windows Forms. (The only catch is
that it's beta... or 1.0, depending upon how you want to look at it.)

 
Reply With Quote
 
=?Utf-8?B?Q2hha3JhdmFydGh5?=
Guest
Posts: n/a
 
      9th May 2007
You can do that by WebUserControl

--
Every thing is perfect, as long as you share!!!

Don''t forget to rate the post


"Jesper, Denmark" wrote:

> Hi,
>
> I would like to build my own controls from the ground up. Just as if the
> Combobox didn't excist and I wanted to create this 'new control' with all is
> glorious functionality. Is there a technology used for this purpose in .net.
>
> Regards
> Jesper.

 
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
Building Server Controls Rob Meade Microsoft ASP .NET 2 17th Jul 2006 09:09 AM
Building controls which works in VS.NET IDE =?Utf-8?B?d2VpY2h1bmcgW01DU0QsIE1DREJBXQ==?= Microsoft ASP .NET 0 3rd Dec 2004 10:29 AM
Building ASP.Net Server Controls..... Nish Microsoft ASP .NET 1 13th Nov 2004 11:11 PM
Question regarding the building of MFC ActiveX controls using VC.NET Robert Hanson Microsoft VC .NET 0 7th Sep 2004 08:44 PM
Building Custom Controls chris fink Microsoft ASP .NET 0 11th Jul 2003 03:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:54 AM.