1
Answer

Enter Key as tab loses keypress event

Angel Princess

Angel Princess

9y
481
1
private void From1_KeyDown(object sender, KeyEventArgs e)
{
 
Control nextControl;
if (e.KeyCode == Keys.Enter)
{
nextControl = GetNextControl(ActiveControl, !e.Shift);
if (nextControl == null)
{
nextControl = GetNextControl(null, true);
}
nextControl.Focus();
e.SuppressKeyPress = true;
 }
this code is for act ENTER key as TAB but if I write code on keypress ENTER, the keypress Enter code doesn't work
 

Answers (1)