Component X Class 
Author Message
 Component X Class

Hello, Id like to know what is the difference between a Component and a
Class. Where did I see it? In the Project menu there are this 2 itens, ADD
COMPONENT, and ADD CLASS, of Visual C#. When to use one and when to use the
other one?

Thanks



Thu, 30 Dec 2004 21:49:20 GMT  
 Component X Class
Component, in addition to Class can be viewed in Designer


Thu, 30 Dec 2004 22:20:48 GMT  
 Component X Class


Quote:
> Hello, Id like to know what is the difference between a Component and a
> Class. Where did I see it? In the Project menu there are this 2 itens, ADD
> COMPONENT, and ADD CLASS, of Visual C#. When to use one and when to use
the
> other one?

A component is simply a basic class that implements the Component model.

The Component model allows you to create a Component that you can drop
on to a form, or use in any standard way.

So, let's say you had an app that had a tree view of Widgets on
the left and a context area on the right. When a user selects a widget,
that widget can have a custom property page which is a Component.

You'd have something like "GetPropertyComponent()". It'd return
a Component object which you can then render in a standard fashion
in the context area at runtime.

Also, being a component, a user can add it to their toolbox and
drag it on to a form at design-time.

So, basically, all those components like "Textbox", "ListView",
etc are all components.

-c



Thu, 30 Dec 2004 23:29:39 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. component class and normal class

2. Using unmanaged classes in components

3. Can you think of a class library or component that you would find useful

4. component class in C#

5. One ATL Component 2 class factories

6. COM/ATL component without a factory class

7. Exposing existing C++ classes as COM component.

8. Putting class templates in component gallery

9. How to use MFC class in COM component??

10. Grid view component or a class ...help

11. Putting class templates in component gallery

12. Component Gallery vs Class Wizard

 

 
Powered by phpBB® Forum Software