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.