Mayur Gujrathi

Mayur Gujrathi

  • NA
  • 119
  • 403.7k

Navigating between controls on enter click in C#

Dec 3 2010 6:53 AM
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)