Hi richard, i hope you can help me. I seem to be drawing a blank here LOL. What i did was created a command button for a VB2008 app i am working on and what i want to do is use the Esc key to carry out the button command. How do i code the command to use the Esc key to work a command button? Hope you can help
Reply from Richard Rost:
Karl, I have to admit I haven't spent a lot of time with VB2008 yet. However, in VB6 there are two properties for buttons that you can set. One is DEFAULT and the other is CANCEL. The DEFAULT button (set the property to true for this button) will be the button that's pressed if the ENTER key is hit on the form. The CANCEL button is pressed if ESCAPE is hit. I'm sure VB2008 has a similar property available.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.