2
Answers

Navigating between controls on enter click in C#

Mayur Gujrathi

Mayur Gujrathi

14y
11.4k
1
the below code is for navigating between controls on enter click in c# on forms but in  my project i am using user controls instead of forms .i am calling user controls on form on button click event. please help its urgent

protected override void OnKeyUp(System.Windows.Forms.KeyEventArgs e)
  {
  if (e.KeyCode  == Keys.Enter)
  {
  e.Handled = true;
  this.ProcessTabKey(!e.Shift);
  }
  else
  {
  e.Handled = false;
  base.OnKeyUp(e);
  }
  }
Answers (2)