Do all the windows and controls (including active-x) displayed inside WinForms application are derived from System.Windows.Forms.Control class?
+3
A:
Basically yes.
However, non-visual components such as Timers are derived from Component (or implement IComponent). Only visual elements like Button and Form are derived from Control.
In addition, ActiveX controls don't derive from Control per se, because they're COM components; instead, when you import an ActiveX control, Visual Studio generates a wrapper that derives from AxHost and hosts the COM object. (AxHost itself does derive from Control.)
itowlson
2010-03-06 07:11:53
A:
I think you should take a look at
http://msdn.microsoft.com/en-us/library/aa651811(VS.71).aspx
Inheritance Hierarchy
System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component System.Windows.Forms..::.Control System.Windows.Forms..::.AxHost System.Windows.Forms..::.ButtonBase System.Windows.Forms..::.DataGrid System.Windows.Forms..::.DataGridView System.Windows.Forms..::.DateTimePicker System.Windows.Forms..::.GroupBox System.Windows.Forms.Integration..::.ElementHost System.Windows.Forms..::.Label System.Windows.Forms..::.ListControl System.Windows.Forms..::.ListView System.Windows.Forms..::.MdiClient System.Windows.Forms..::.MonthCalendar System.Windows.Forms..::.PictureBox System.Windows.Forms..::.PrintPreviewControl System.Windows.Forms..::.ProgressBar System.Windows.Forms..::.ScrollableControl System.Windows.Forms..::.ScrollBar System.Windows.Forms..::.Splitter System.Windows.Forms..::.StatusBar System.Windows.Forms..::.TabControl System.Windows.Forms..::.TextBoxBase System.Windows.Forms..::.ToolBar System.Windows.Forms..::.TrackBar System.Windows.Forms..::.TreeView System.Windows.Forms..::.WebBrowserBase
Nasser Hadjloo
2010-03-06 07:24:46