Sunday, December 11, 2011

How can u bind the enter key to a command button on VB 6.0?

I'm making a program using 6.0 for my thesis and i was wondering if there is a code that can ';bind'; the Enter key or any key to a command button, like when logging in on yahoo messenger, when you put the right user-name and password, you can immediately press the enter key to log in rather than using the mouse to click the Sign In button.How can u bind the enter key to a command button on VB 6.0?
Simply make the button the Default button. (Look at the button properties), find the one called ';Default';, and set to Yes.



In the same breath: making a button a Cancel button will make the ESC key press that button.How can u bind the enter key to a command button on VB 6.0?
Toggle the ';Default'; property of the desired push-button.

No comments:

Post a Comment