Enter Key question

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I know this has probably been hashed out before and hopefully the answer is
a simple one, but here is the problem:

I have a small windows form where the user inputs the user id into the first
text box and then the password in the second textbox. This form then has a
button to submit. How can I program so that once the user enters the
password if they hit ENTER then it will be just like using the mouse to
press the button?

Thanks for the information.

Brad
 
Brad said:
I have a small windows form where the user inputs the user id into the first
text box and then the password in the second textbox. This form then has a
button to submit. How can I program so that once the user enters the
password if they hit ENTER then it will be just like using the mouse to
press the button?

Assign the button to the form's 'AcceptButton' property.
 
Thank you. It is funny some of these little things that I don't know about
that I learn every day.

Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top