C# TextBox文本内容选中 textBox1.Focus(); textBox1.SelectionStart = 0; //设置起始位置 textBox1.SelectionLength = 2; //设置长度 textBox1.ScrollToCaret();