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.
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
http://msdn.microsoft.com/en-us/library/system.windows.forms.keys.aspx
Keys.Up, Keys.Left, Keys.Right, Keys.Down.
: 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