C# : How to handle the ENTER key

  • Thread starter sravan_reddy001
  • 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"
 
A

Alex Meleta

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>
 
A

Aneesh Pulukkul[MCSD.Net]

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.
 
S

sravan_reddy001

that's good idea but how can we create a default button and make the
form accept the buuton on pressing the enter key..
 

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

Top