Catching return key in C# text box

AgentZap

Senior member
Sep 1, 2001
730
0
0
I have a textbox that I want to process data in after the user types in a response and hits the enter key. In class I was able to use the code I have in the code attachment.

However, when I got home "e" does not have the KeyChar method available to it. My only methods available are .Equals, .GetHashCode, .GetType, and .ToString.

I am not sure how I would reference the enter keypress at home given those choices. I am using Microsoft Visual C# .NET 2002. In the lab at college we are running the same thing so its strange that I don't have the option here. <shrug>

Thanks in advance for your help and suggestions.
 

AgentZap

Senior member
Sep 1, 2001
730
0
0
Oops user error :)

my example is correct, but in my actual cs file I had something other than System.Windows.Forms.KeyPressEventArgs

I love when its a stupid error instead of something serious