开发者

.NET WinForms Control class

Do all the windows and controls (including active-x) displayed inside WinForms app开发者_StackOverflow社区lication are derived from System.Windows.Forms.Control class?


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.)


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜