Down Arrow Key
-
How to get that any Arrow key is pressed.
-
How to get that any Arrow key is pressed.
Override the KeyPress, KeyDown, or KeyUp event (as you need) in your form class, and check the KeyValue values of KeyEventArgs. Peter Molnar
-
Override the KeyPress, KeyDown, or KeyUp event (as you need) in your form class, and check the KeyValue values of KeyEventArgs. Peter Molnar
I m sorry are you asking me to use in Key down event
if(e.KeyValue == Keys.Down) // this gives me error because KeyValue Returns // int
i have tried every mathod that i know to get ArrowKeys but not able to do so. Please help me. -
How to get that any Arrow key is pressed.
Ok Problem Solved. For others Info how i able to do this :(
havn't find any other mathod so if you know any other mathod i really would like to read. Thanks in advance
-
Ok Problem Solved. For others Info how i able to do this :(
havn't find any other mathod so if you know any other mathod i really would like to read. Thanks in advance
you should cast the Keys enum to int, so it will compile
private void OnKeyPress(object sender, System.Windows.Forms.KeyEventArgs e)
{if(e.KeyValue == (int)Keys.Down)
{
...
}
}Peter Molnar