Key Codes for Arrow Keys

Can someone help me get the key codes for the arrow keys in C # .net keypress events? Can you help me get out of this checkpoint?

Best regards, Arun.

+5
source share
3 answers

Do you mean the KeyUp event? KeyPress does not start for Arrows, and the args arguments do not have the KeyCode property, but for the arrow keys in the keyUp event, they are:

Keys.Up, Keys.Down, Keys.Left, Keys.right

+11
source
+4
source

: http://msdn.microsoft.com/en-in/library/aa243025(v=vs.60).aspx

:

vbKeyLeft   37  LEFT ARROW key
vbKeyUp     38  UP ARROW key
vbKeyRight  39  RIGHT ARROW key
vbKeyDown   40  DOWN ARROW key

e.KeyValue==39 
0
source

All Articles