[英].NET WinForms Control class
WinForms應用程序中顯示的所有窗口和控件(包括active-x)是否都是從System.Windows.Forms.Control類派生的?
基本上是的。
但是,諸如計時器之類的非可視組件是從Component(或實現IComponent)派生的。 只有像Button和Form這樣的可視元素才能從Control派生。
另外,ActiveX控件不是從Control本身派生的,因為它們是COM組件; 相反,當您導入ActiveX控件時,Visual Studio會生成一個從AxHost派生並托管COM對象的包裝器。 (AxHost本身確實來自Control。)
我想你應該看看
http://msdn.microsoft.com/en-us/library/aa651811(VS.71).aspx
繼承層次結構
系統.. ::。對象
系統.. ::。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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.