going from field to field using ENTER

  • Thread starter Thread starter Laszlo Henning
  • Start date Start date
L

Laszlo Henning

I would like to make it possible to jump from a field to another field (the
next one in the tab index) using enter also and not only tab. How can this
be done either without onkeydown or with it.

Laszlo Henning
 
Hi Laszlo,

Using the KeyDown event you can use this code to simulate a TAB
each time you press ENTER. Subscribe to this event in all controls
where you want this behavior.

private void KeyDownEvent(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter)
SendKeys.Send("{TAB}");
}
 
Back
Top