C# : How to handle the ENTER key

  • Thread starter Thread starter sravan_reddy001
  • Start date Start date
S

sravan_reddy001

i had designed a win app(an address book)

when the user wants to enter the contact he will type in all the
details and "HE SHOULD CLICK ON THE ADDENTRY BUTTON PROVIDED"

i want to simplify this task for the user by allowing the data to bw
added in database when "HE PRESSED ENTER KEY AFTER ENTERING THE
DETAILS"
 
Hi, KenDev

Easy way is to create a default button and make a form to accept the button
as defult action by enter.

WBR, Alex Meleta
Blog:: devkids.blogspot.com



s> i had designed a win app(an address book)
s>
s> when the user wants to enter the contact he will type in all the
s> details and "HE SHOULD CLICK ON THE ADDENTRY BUTTON PROVIDED"
s>
s> i want to simplify this task for the user by allowing the data to bw
s> added in database when "HE PRESSED ENTER KEY AFTER ENTERING THE
s> DETAILS"
s>
 
Hi, KenDev

Easy way is to create a default button and make a form to accept the button
as defult action by enter.

WBR, Alex Meleta
Blog:: devkids.blogspot.com

s> i had designed a win app(an address book)
s>
s> when the user wants to enter the contact he will type in all the
s> details and "HE SHOULD CLICK ON THE ADDENTRY BUTTON PROVIDED"
s>
s> i want to simplify this task for the user by allowing the data to bw
s> added in database when "HE PRESSED ENTER KEY AFTER ENTERING THE
s> DETAILS"
s>

If you want to avoid the button, trap the key in event for the
textbox(or any input box) that you are using. KeyDown event would do I
think.
 
that's good idea but how can we create a default button and make the
form accept the buuton on pressing the enter key..
 
Back
Top