Angel Princess

Angel Princess

  • NA
  • 100
  • 47.1k

when Enter key press is act as tab

Jun 8 2015 3:58 AM
I have code for working enter key press as a tab but it lost keypress enter control
code is
 
if (e.KeyCode == Keys.Enter)
{
//If so, it gets the next control and applies the focus to it
nextControl = GetNextControl(ActiveControl, !e.Shift);
if (nextControl == null)
{
nextControl = GetNextControl(null, true);
}
nextControl.Focus();
//Finally - it suppresses the Enter Key
e.SuppressKeyPress = true;
}
}
I want enter key as tab but without loosing events 

Answers (3)