Angel Princess

Angel Princess

  • NA
  • 100
  • 47.3k

Enter Key as tab loses keypress event

Jun 20 2015 4:17 AM
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)