textBox读取按键信息,并把光标移到末尾

private void txtPackno_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((int)e.KeyChar == 13)  //回车键
            {
                txtPackno.Text += ";";
                this.txtPackno.Select(txtPackno.Text.Length, 0);
            }
        } 

 

posted @ 2015-09-10 13:19  网络飞侠  阅读(137)  评论(0编辑  收藏  举报