在keypress事件中
private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { button2.Focus(); } if (e.KeyChar == System.Convert.ToChar(13)) { e.Handled = true; } }
2021-09-10 02:17:42
在keypress事件中
private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { button2.Focus(); } if (e.KeyChar == System.Convert.ToChar(13)) { e.Handled = true; } }