|
-
Apr 12th, 2004, 11:13 AM
#1
Thread Starter
Addicted Member
components?classes?
whates the differenct between components and collections?
as far as i know we create objects out of both of them.
component can be added to the control bar, classes cant , is that the only difference?
thanks ...
-
Apr 13th, 2004, 12:04 AM
#2
Sleep mode
Components in .NET is customized classes that have some extra generated code related to the inherited base classes and for creating controls and components that will be used on forms or whatever container, Classes are classes .
-
Apr 13th, 2004, 11:07 PM
#3
Thread Starter
Addicted Member
little mistake there, what i ment was acctualy controls vs components
thanks
-
Apr 13th, 2004, 11:42 PM
#4
First lets be technical for a moment. Components, Controls, and just about everything else are all really just classes/objects. The difference between a Component Class and a Control Class are what it inherits from. A Component is a basic object which implements the IComponent interface. A Control is derived from Component but also implements many Interfaces in order to be a Window as well. So all controls are components, but not all components are controls. Now what that means in english is that a Component is an object with the necessary structure and functionality to do shown in the IDE at designtime but does not implement that it can be hosted by other objects such as a form (or act as a 'window'). A Control has all of the functionality of a Component but also all of the functionality and stucture to be hosted on a form or other container control or object and can be a 'window'.
You can see the inheritance structure of an object by viewing it in the Object Browser (Ctrl+Alt+J).
Last edited by Edneeis; Apr 13th, 2004 at 11:49 PM.
-
Apr 14th, 2004, 06:17 AM
#5
Sleep mode
Components like : Timers , FileSystemWatcher , ..etc
Controls like : Buttons , ListBox , ComboBox,Menus ...etc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|