hi
how can I move through textboxes using down and up arrows ?
thanx
Printable View
hi
how can I move through textboxes using down and up arrows ?
thanx
anyone ?
OK , What is the ascii code of vbKeyDown then ?:rolleyes:
Didn't try this but..... its from the KeyUp event args...
Code:If e.KeyCode = Keys.Up Then
no way . aren't all arrow keys have events ? I mean when I press left arrow then something would happen .anyone can help plz ?
This is how I do it with C#
Code:private void textBox1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyCode.ToString() == "Down")
{
// Go to the control down from this one.
textBox2.Focus();
return;
}
if(e.KeyCode.ToString() == "Up")
{
// Go to the control up from this one.
someControlOnTop.Focus();
return;
}
}
exactly what I needed . Thanks hellswraith.
Just out of curiousity, why do you have to use tostring?
apparently 'If e.KeyCode = Keys.Up Then' didn't work according to Pirate but 'If e.KeyCode.ToString = "Up" Then' did?
I have still not tried this, but this puzzles me.....
your way it perfect too Athley. When I was trying that in the KeyPress not in the KeyUp . I am using this anyways:
I think no need to convert that to string Unless C# only accepts that way , I guess no .:DVB Code:
Private Sub TextBox1_KeyUp........................ If e.KeyCode = Keys.Up Then TextBox2.Focus() End If If e.KeyCode = Keys.Down Then TextBox3.Focus() End If end sub
Aha, well I got a little confused there. Now I can sleep tonight. :)
hehe:D :D