HOW TO USE ENTER KEY? WHEN AM USING TWO TEXTBOX THEN TO ENTER THE KEY AUTOMATICALLY GOTO NEXT FORM. THIS TIME AM NOT USING TAB OR MOUSE ??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lawrence PondPosted Oct 27, 2014, 12:49 AM
If you are using ASP.NET you could do the following
VulpesPosted Oct 23, 2014, 6:50 AM
Wim SturkenboomPosted Oct 23, 2014, 3:18 AM
For a windows forms application (not 100% clear from your description), below a little demo
private void textBox2_KeyDown(object sender, KeyEventArgs e)
{
char x = (char)e.KeyValue;
if (x == 0x0A)
{
MessageBox.Show("0x0A", "KeyDown");
e.Handled = true;
}
if (x == 0x0D)
{
MessageBox.Show("0x0D", "KeyDown");
e.Handled = true;
}
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
char x = e.KeyChar;
if (x == 0x0A)
{
MessageBox.Show("0x0A", "KeyPress");
e.Handled = true;
}
if (x == 0x0D)
{
MessageBox.Show("0x0D", "KeyPress");
e.Handled = true;
}
}
0x0D seems the right one for
Note: please use decent titles for your threads.