winform 记事本 剪切 粘贴 全选 撤销

 1 private void 撤消UToolStripMenuItem_Click(object sender, EventArgs e)
 2         {
 3             textBox1.Undo();
 4         }
 5 
 6         private void 剪切TToolStripMenuItem_Click(object sender, EventArgs e)
 7         {
 8             if (textBox1.SelectionLength>0)
 9             {
10                 textBox1.Cut();
11             }
12         }
13 
14         private void 复制CToolStripMenuItem_Click(object sender, EventArgs e)
15         {
16             if (textBox1.SelectionLength > 0)
17             {
18                 textBox1.Copy();
19             }
20         }
21 
22         private void 粘贴PToolStripMenuItem_Click(object sender, EventArgs e)
23         {
24             textBox1.Paste();
25         }
26 
27         private void 全选AToolStripMenuItem_Click(object sender, EventArgs e)
28         {
29             textBox1.SelectAll();
30         }

 

posted @ 2017-11-27 10:42  Jokerpapapa  阅读(365)  评论(0编辑  收藏  举报