I need to capture the key that is pressed on the key board and react accordingly. I've tried to figure out how to catch the key in KeyDown, KeyPress, and KeyUp using the event arg (e) with no luck.
CODE
private void myProg_KeyUp(Object sender, KeyEventArgs e)
{
switch (e.KeyValue)
case 0:
//todo work
break;
case 1:
//todo work
break;
}
this just isn't working and I'm not sure what I'm doing wrong. I'm new to programming and have not had to capture key press's before so this one has me stumped.
Any help would be appriciated. I need to capture the number keys, period key, enter key, and Symbol keys. I am ignoring the alphabet basically.
I was hoping that the basic calculator example would have this in it but I didn't find it there. (maybe it could be added?)
This post has been edited by Allen.Brumley: 23 Aug, 2008 - 06:43 AM