Instead of Tab can we used Enter button in c#
Hello Every one,
well i m using Tab button to move other text boxes can we used enter button to do same kind of job means instead of tab can we used enter button if u know then let me know
thanks in advance
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 6, 2009, 12:56 AM EST
As I know it's possible. But I haven't tried that.
Refer to this link. It might help you.
http://social.msdn.microsoft.com/Forums/en/csharplanguage/thread/a7b02a64-82fd-4ca6-a924-d8bd2a6e11c9
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 6, 2009, 1:15 AM EST
you Can Do this By Following Code
if my answer helps you then check "do you like this answer" check box :)
private void Form1_Load(object sender, EventArgs e)
{
this.KeyPreview = true;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter)
{
e.Handled = false;
SendKeys.Send("{TAB}");
}
}