標籤:
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控制項-------------------------------------
類似一個表
可顯示資料庫內容
記事本
記事本和winform 容器控制項