473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

What is the difference between Component and UserControl?

In the WinForms context.
Jun 27 '08 #1
3 2916
On May 8, 3:47*pm, Frank Rizzo <n...@none.netwrote:
In the WinForms context.

UserControl derive from (like 4 or 5 levels below) Component.

Other than that I see no other relationship

What is the doubt that you have?
Jun 27 '08 #2
Ignacio Machin ( .NET/ C# MVP ) wrote:
On May 8, 3:47 pm, Frank Rizzo <n...@none.netwrote:
>In the WinForms context.


UserControl derive from (like 4 or 5 levels below) Component.

Other than that I see no other relationship

What is the doubt that you have?
Just wanted to know how I should start coding my control. It seems that
other than a workable designer UserControl does not offer anything else
over Component.
Jun 27 '08 #3
On Thu, 08 May 2008 15:17:56 -0700, Frank Rizzo <no**@none.netwrote:
Just wanted to know how I should start coding my control. It seems that
other than a workable designer UserControl does not offer anything else
over Component.
Coding what control?

If you intend to write a custom control for use in a Forms application,
then you should inherit Control, not Component. Not only does that
provides a very large, basic feature set that you'd need to reimplement
anyway, a lot of the Forms API requires Control instances anyway.
Starting with Component just won't do.

UserControl is misnamed. It's really more of a design-time custom
control, used for making new composite controls out of existing controls.
It's definitely not the right general-purpose base class for a custom
control. You'd only use it if your custom control was in fact an
aggregate of several other pre-existing controls. The name sounds
general-purpose, but the control is not.

Pete
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Anonymous | last post by:
Hello, i have developed a web componenet library project, which access the usercontrol that resides in another web application. In my component, I load the control like this: Dim uCtrl As...
6
by: TnCoder | last post by:
Hi; I just moved from vb 6.0 to vb.net. I am trying to add MS Calendar control to my toolbox. After the control is added, it is not enabled. Is there dll I have to add? Can anyone who could give...
4
by: orangepic333 | last post by:
Could someone tell me what's the difference between the two? Is it that a class is used within an OO language while a component can be exported between OO languages? Are there other...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
3
by: BluDog | last post by:
Hi I have a component that inherits from TreeView, my project is a standard exe. How do i get the component into the toolbox for use within the project? I find that only controls based on...
1
by: Dave | last post by:
hi, I am creating a usercontrol in .net that inherits from the panel control. I want to display it in the component tray -- like the timer control -- and not on the form. thanks, dave
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
4
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm about to create a UserControl for my web project, but I'm wondering if I need to create 2 UserControls instead. Because these UserControls will be very similar, the only...
0
by: bharathreddy | last post by:
Major differences between a usercontrol in windows application and a web user control: Windows UserControl, Web UserControl 1) .cs file extension , ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.