Button NOT reacting on Enter keypress
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Button NOT reacting on Enter keypress

  1. #1
    Join Date
    Mar 2012
    Posts
    2

    Button NOT reacting on Enter keypress

    How do I prevent a button, that is the only one on the form, gets activated by a press on the Keyb. Enter ?

    The reason is a little complicated to explain, but thoose familiar with barcode reader input will probably know why )

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,860

    Re: Button NOT reacting on Enter keypress

    Windows form or web form?

    Also your question is a little difficult to follow.

    Is the button code being activated now and you want to stop it from doing so or is the button code not being activated and you would like it to run on enter key press?
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jan 2009
    Posts
    596

    Re: Button NOT reacting on Enter keypress

    Quote Originally Posted by Pivskid View Post
    How do I prevent a button, that is the only one on the form, gets activated by a press on the Keyb. Enter ?
    The form's AcceptButton property specifies which button is 'clicked' when the return key is pressed. Setting this to null should work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center