在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;
}
}
标签:控件,Handled,C#,KeyChar,System,private,Enter
来源: https://www.cnblogs.com/WP-WangPin/p/13905034.html