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