记事本和winform 容器控件
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication6 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void 撤消UToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.Undo(); } private void 重复RToolStripMenuItem_Click(object sender, EventArgs e) { } private void 剪切TToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.Cut(); } private void 复制CToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.Copy(); } private void 粘贴PToolStripMenuItem_Click(object sender, EventArgs e) { textBox1.Paste(); } private void 退出XToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } private void 选项OToolStripMenuItem_Click(object sender, EventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { string a = textBox1.Text.Length.ToString(); toolStripStatusLabel2.Text = a; } } }
--------------菜单和工具栏--------------------------------
ContextMenuStrip---------右键菜单栏
MenuStrip------------顶部菜单栏
statusStrip----------底部菜单栏
ToolStrip------------工具栏
ToolStripContainer-----(四周可以放置 菜单、控件)
---------容器------------------------------
FlowLayoutPanel--------(内部控件)流式布局
GroupBox----------控件分组 有边框、标题
----
Panel-----------控件分组 无边框、标题
---
SplitContainer-----就是两个Panel
---
TabControl--------带标签的选项卡
---
TableLayoutPanel---------类似表格 一格只能放一个控件
--------LisView控件-------------------------------------
类似一个表
可显示数据库内容
记事本