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}");
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top