I'm learning C# and am stuck. I want to be able to hit the Enter key while my
cursor is in a text box and have it act as if I had clicked a button. I know I
can wire different events in the form to the button_click event handler. It
seems like this would be a simple matter but I'm not finding the right event to
use. You would think the Enter event would be it, but that seems to only act if
you enter the text box by tabbing or clicking on it, and not by hitting Enter
while in the text box.
I had limited success with the KeyDown event but it's not perfect. What am I
missing here?
Thanks, Paul
cursor is in a text box and have it act as if I had clicked a button. I know I
can wire different events in the form to the button_click event handler. It
seems like this would be a simple matter but I'm not finding the right event to
use. You would think the Enter event would be it, but that seems to only act if
you enter the text box by tabbing or clicking on it, and not by hitting Enter
while in the text box.
I had limited success with the KeyDown event but it's not perfect. What am I
missing here?
Thanks, Paul

Comment