SystemWindowsForms层次结构.docx
《SystemWindowsForms层次结构.docx》由会员分享,可在线阅读,更多相关《SystemWindowsForms层次结构.docx(13页珍藏版)》请在三一办公上搜索。
1、SystemWindowsForms层次结构System.Windows.Forms的层次结构,在树图中显示 在Visual Studio 中新建Winform应用程序YlqForm,新建一个windows窗体 GetClassForm,窗体GetClassForm中加入TreeView:tvList,RichTextBox: richTextBox1, Button:btnFind,以及两个Label 如下图所示: 程序源代码: using System; using System.Collections.Generic; using System.ComponentModel; using
2、 System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace YlqForm public partial class GetClassForm : Form DataTable dtClass = new DataTable; public GetClassForm InitializeComponent; / / 获得System.Windows.Forms类的层次表 / 返回数据表的列名有:ClassName,BaseClassName,Remark / / pri
3、vate DataTable GetDataTable DataTable dt = new DataTable; /* * 列ClassName -类名如Label * 列BaseClassName -基类名如Control。联合为一起即Label : Control * 列Remark -类(如:Label)的详细说明 */ dt.Columns.Add(ClassName, typeof(string); dt.Columns.Add(BaseClassName, typeof(string); dt.Columns.Add(Remark, typeof(string); /* * 数据
4、详细行 * 依次输入ClassName、BaseClassName、Remark * 如Label,Control,表示标准Windows 标签。 */ #region 层次结构的根 dt.Rows.Add(System.MarshalByRefObject, System.Object, 允许在支持远程处理的应用程序中跨应用程序域边界访问对象。); dt.Rows.Add(Component, System.MarshalByRefObject, 提供System.ComponentModel.IComponent 接口的基实现并启用应用程序之间的对象共享。); #endregion #re
5、gion 基本System.Windows.Forms控件类 dt.Rows.Add(Button, ButtonBase, 表示Windows 按钮控件。); dt.Rows.Add(CheckBox, ButtonBase, 表示Windows System.Windows.Forms.CheckBox); dt.Rows.Add(CheckedListBox, ListBox, 显示一个System.Windows.Forms.ListBox,其中在每项的左边显示一个复选框。); dt.Rows.Add(ColorDialog, CommonDialog, 表示一个通用对话框,该对话框显
6、示可用的颜色以及允许用户定义自定义颜色的控件。); dt.Rows.Add(ComboBox, ListControl, 表示Windows 组合框控件。); dt.Rows.Add(ContextMenuStrip, ToolStripDropDownMenu, 表示快捷菜单。); dt.Rows.Add(DataGridView, Control, 在可自定义的网格中显示数据。); dt.Rows.Add(DateTimePicker, Control, 表示一个Windows 控件,该控件用来让用户选择日期和时间并以指定的格式显示此日期和时间。); dt.Rows.Add(DomainU
7、pDown, UpDownBase, 表示显示字符串值的Windows 数字显示框。); dt.Rows.Add(ErrorProvider, Component, 提供用于指示窗体上的控件具有关联错误的用户界面。); dt.Rows.Add(EventLog, Component, 提供与Windows 事件日志的交互。); /System.Diagnostics.EventLog dt.Rows.Add(FlowLayoutPanel, Panel, 表示一个沿着水平或垂直方向动态排放其内容的面板。); dt.Rows.Add(FolderBrowserDialog, CommonDial
8、og, 提示用户选择文件夹。无法继承此类。); dt.Rows.Add(FontDialog, CommonDialog, 提示用户从本地计算机上安装的字体中选择一种字体。); dt.Rows.Add(GroupBox, Control, 表示一个Windows 控件,该控件显示围绕一组具有可选标题的控件的框架。); dt.Rows.Add(HelpProvider, Component, 提供控件的弹出或联机帮助。); dt.Rows.Add(HScrollBar, ScrollBar, 表示一个标准Windows 水平滚动条。); dt.Rows.Add(ImageList, Compon
9、ent, 提供管理System.Drawing.Image 对象集合的方法。无法继承此类。); dt.Rows.Add(Label, Control, 表示标准Windows 标签。); dt.Rows.Add(LinkLabel, Label, 表示可显示超链接的Windows 标签控件。); dt.Rows.Add(ListBox, ListControl, 表示用于显示项列表的Windows 控件。); dt.Rows.Add(ListView, Control, 表示Windows 列表视图控件,该控件显示可用四种不同视图之一显示的项集合。); dt.Rows.Add(MaskedTe
10、xtBox, TextBoxBase, 使用掩码区分正确和不正确的用户输入。); dt.Rows.Add(MenuStrip, ToolStrip, 提供窗体的菜单系统。); dt.Rows.Add(MonthCalendar, Control, 表示一个Windows 控件,该控件使用户能够使用可视月历显示来选择日期。); dt.Rows.Add(NotifyIcon, NotifyIcon, 指定在通知区域中创建图标的组件。无法继承此类。); dt.Rows.Add(NumericUpDown, UpDownBase, 表示显示数值的Windows 数字显示框。); dt.Rows.Add
11、(OpenFileDialog, FileDialog, 提示用户打开文件。无法继承此类。); dt.Rows.Add(PageSetupDialog, CommonDialog, 允许用户更改与页面相关的打印设置,包括边距和纸张方向。无法继承此类。); dt.Rows.Add(Panel, ScrollableControl, 用于对控件集合进行分组。); dt.Rows.Add(PerformanceCounter, Component, 表示Windows NT 性能计数器组件。);/System.Diagnostics.PerformanceCounter dt.Rows.Add(Pi
12、ctureBox, Control, 表示用于显示图像的Windows 图片框控件。); dt.Rows.Add(PrintDialog, CommonDialog, 允许用户从Windows 窗体应用程序中选择一台打印机,并选择文档中要打印的部分。); dt.Rows.Add(PrintPreviewControl, Control, 表示Windows 窗体应用程序打印预览的原始预览部分,没有任何对话框或按钮。); dt.Rows.Add(Process, Component, 提供对本地和远程进程的访问并使您能够启动和停止本地系统进程。);/System.Diagnostics.Proc
13、ess dt.Rows.Add(ProgressBar, Control, 表示Windows 进度栏控件。); dt.Rows.Add(PropertyGrid, ContainerControl, 提供用于浏览对象属性的用户界面。); dt.Rows.Add(RadioButton, ButtonBase, 当与其他System.Windows.Forms.RadioButton 控件成对出现时,使用户能够从一组选项中选择一个选项。); dt.Rows.Add(RichTextBox, TextBoxBase, 表示Windows 多格式文本框控件。); dt.Rows.Add(SaveF
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SystemWindowsForms 层次 结构
链接地址:https://www.31ppt.com/p-3166459.html