Component and Class

C

clara

Hi all,

What is the difference between adding a component or a class to a project?
In Toolbox, there is a component section, how can be a component added to
there?

Clara
 
K

kimiraikkonen

Hi all,

What is the difference between adding a component or a class to a project?
http://www.devasp.net/net/samplechapters/7167/default10.asp
http://msdn.microsoft.com/en-us/library/0b1dk63b(VS.71).aspx
http://msdn.microsoft.com/en-us/library/0b1dk63b.aspx


In Toolbox, there is a component section, how can be a component added to
there?

To add an component, right click on toolbox -> Choose Items -> Check a
component from .NET or COM tab then click OK. It should be added if
it's .a vaid NET or COM component.

Thanks,

Onur Güzel
 
P

Phill W.

clara said:
What is the difference between adding a component or a class to a project?

A Class is primarily just a bundle of code.

A Component is a kind of Class.
A /Control/ is a kind of Class.

In this case, the important difference is between Component and Control.

A /Control/ can be seen by the user; a /Component/ cannot.

For Example:
Controls: TextBox, RadioButton, Label
All things the user can /see/.

Components: Timer, TooltipProvider, MainMenu
You might see the /effect/ of one of these, or another Control that
hangs off of them, but you can't actually get to see one on its own.
In Toolbox, there is a component section, how can be a component added to
there?

To create a Component, create a class that inherits from
System.ComponentModel.Component.

To add it into (/any/ section in) the ToolBox, right-click inside that
section and select Add/Remove.

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top