Dear All;
I am beginner for C#.net. I have a small Question.
There is no of textboxes in my form.How to write code When user enter data to one textbox and after press enter key cursor should setfocus to another Text box.
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.
Vimal KandasamyPosted Mar 26, 2009, 7:06 AM
try the following
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
textBox2.Focus();
}
Henric JohanssonPosted Mar 26, 2009, 6:43 AM
It will set that textBox as focused