在文本框中按Enter键时,我在删除哔声时遇到问题。
这不起作用:
private void textBox3_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
e.SuppressKeyPress = true;
button1.PerformClick();
}
}
答案 0 :(得分:0)
我找到了答案!
private void textBox2_KeyDown(object sender, KeyEventArgs e)
{
//Pressing ENTER
if (e.KeyCode == Keys.Enter)
{
button1.Select();
e.SuppressKeyPress = true;
SendKeys.Send("{ENTER}");
}
}