0

Hi all just a quick question, what code do I use to make user input of RETURN(enter button) defaulting to an OK button on a windows form? thanks for your time.

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by shahab_qureshi
2

In form properties you will find property called "Accept button" set it to the button you need to be pressed if user press "Enter"

Votes + Comments
Thanks for the help
-3

double click that text box and write this code


this.AcceptButton= button1 (name of button you want as accept button)

shahab Qureshi

Votes + Comments
Try not to resurrect 2 year old threads.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.