this.txtboxXSNum.Focus();//获取焦点 this.txtboxXSNum.Select(this.txtboxXSNum.TextLength, 0);//光标定位到文本最后 this.txtboxXSNum.ScrollToCaret();//滚动到光标处