Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The ENTER key is a special case. If

Status
Not open for further replies.

JohnYingling

Programmer
Mar 24, 2001
3,742
US
The ENTER key is a special case. If a command button has property DEFAULT set to TRUE then the following applies:

"Only one command button on a form can be the default command button. When Default is set to True for one command button, it's automatically set to False for all other command buttons on the form. When the command button's Default property setting is True and its parent form is active, the user can choose the command button (invoking its Click event) by pressing ENTER. Any other control with the focus doesn't receive a keyboard event (KeyDown, KeyPress, or KeyUp) for the ENTER key unless the user has moved the focus to another command button on the same form. In this case, pressing ENTER chooses the command button that has the focus instead of the default command button."



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top