资源描述:
《system.windows.forms层次结构》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实用标准文案System.Windows.Forms的层次结构,在树图中显示★在VisualStudio中新建Winform应用程序YlqForm,新建一个windows窗体GetClassForm,窗体GetClassForm中加入TreeView:tvList,RichTextBox:richTextBox1,Button:btnFind,以及两个Label如下图所示:★程序源代码:usingSystem;usingSystem.Collections.Generic;usingSystem.C
2、omponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;namespaceYlqForm{publicpartialclassGetClassForm:Form{DataTabledtClass=newDataTable();publicGetClassForm(){InitializeComponent();}精彩文档实用标准文案//////获得Sy
3、stem.Windows.Forms类的层次表///返回数据表的列名有:ClassName,BaseClassName,Remark//////privateDataTableGetDataTable(){DataTabledt=newDataTable();/**列ClassName---类名如Label*列BaseClassName---基类名如Control。联合为一起即Label:Control*列Remark---类(如:Label
4、)的详细说明*/dt.Columns.Add("ClassName",typeof(string));dt.Columns.Add("BaseClassName",typeof(string));dt.Columns.Add("Remark",typeof(string));/**数据详细行*依次输入ClassName、BaseClassName、Remark*如"Label","Control","表示标准Windows标签。"*/#region层次结构的根dt.Rows.Add("System.
5、MarshalByRefObject","System.Object","允许在支持远程处理的应用程序中跨应用程序域边界访问对象。");dt.Rows.Add("Component","System.MarshalByRefObject","提供System.ComponentModel.IComponent接口的基实现并启用应用程序之间的对象共享。");#endregion#region基本System.Windows.Forms控件类dt.Rows.Add("Button","ButtonBas
6、e","表示Windows按钮控件。");dt.Rows.Add("CheckBox","ButtonBase","表示WindowsSystem.Windows.Forms.CheckBox");dt.Rows.Add("CheckedListBox","ListBox","显示一个System.Windows.Forms.ListBox,其中在每项的左边显示一个复选框。");dt.Rows.Add("ColorDialog","CommonDialog","表示一个通用对话框,该对话框显示可用的
7、颜色以及允许用户定义自定义颜色的控件。");dt.Rows.Add("ComboBox","ListControl","表示Windows组合框控件。");dt.Rows.Add("ContextMenuStrip","ToolStripDropDownMenu","表示快捷菜单。");dt.Rows.Add("DataGridView","Control","在可自定义的网格中显示数据。");dt.Rows.Add("DateTimePicker","Control","表示一个Windows精彩
8、文档实用标准文案控件,该控件用来让用户选择日期和时间并以指定的格式显示此日期和时间。");dt.Rows.Add("DomainUpDown","UpDownBase","表示显示字符串值的Windows数字显示框(也称为up-down控件)。");dt.Rows.Add("ErrorProvider","Component","提供用于指示窗体上的控件具有关联错误的用户界面。");dt.Rows.Add("EventLog","Component","提供与Wind