1. text内容全选事件
textBox1.selectAll();
2.失去与获取焦点事件
- textox1.LostFocus += new EventHandler(txt_LostFocus);
- textBox1.GotFocus += new EventHandler(txt_GotFocus);
- textBox1.MouseClick += new MouseEventHandler(textBox5_MouseClick);
c# TextBox
原文:http://www.cnblogs.com/wang-xiaohui/p/7349595.html