Key down events.

Timeaisis's Avatar, Join Date: Apr 2008
Newbie Member
This is probably a stupid question, but I couldn't find it anywhere else.

I know there is a way, but I'm new to the language...anyway.

I'm trying to make it so that both a button press and the enter key will both call the same function, and I can get the button working find...but I don't know how to 'detect' if the enter key is down. I know of ways, but there must be something very simple that I'm overlooking...

thankks for the help.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
As far as I know you don't need to be doing anything unless you have messed up with the keyboard events
CyCloneNL's Avatar, Join Date: May 2008
Light Poster
Look for the AcceptButton property of your form, if you set that to your button it will activate when the user presses the Enter key.