Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

the <ENTER> Event

I need to catch the event where the user presses the Enter key, when the focus is on a particular text field.  So when I saw an event named, "Enter", I thought my work was done.  Except that event doesn't seem to fire when I press Enter.  What am I doing wrong?

Thanks a lot.
0
ba272
Asked:
ba272
1 Solution
 
Fahad MukhtarDistinguished EngineerCommented:
In the KeyUp Event of that particular textfiled write:

if (e.KeyCode==Keys.Enter)
      MessageBox.Show("Work done");

then you will be able to catch the Enter Key in that text field

0
 
ba272Author Commented:
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now