Enter Key on Keyboard

I am working with a program that win the user presses enter on the keyboard the program clicks a button. This works fine accept everytime the user presses enter I get an annoying system beep. I have heard to use the KeyPress event of the form unstead of the KeyDown event but it doesn't matter. I will still get the annoying system beep. If anyone could help me that would be great. Thanks!

Comments

  • : I am working with a program that win the user presses enter on the
    : keyboard the program clicks a button. This works fine accept
    : everytime the user presses enter I get an annoying system beep. I
    : have heard to use the KeyPress event of the form unstead of the
    : KeyDown event but it doesn't matter. I will still get the annoying
    : system beep. If anyone could help me that would be great. Thanks!

    In the KeyDown event, set e.Handled = True and e.SuppressKeyPress = True.

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
  • : : I am working with a program that win the user presses enter on the
    : : keyboard the program clicks a button. This works fine accept
    : : everytime the user presses enter I get an annoying system beep. I
    : : have heard to use the KeyPress event of the form unstead of the
    : : KeyDown event but it doesn't matter. I will still get the annoying
    : : system beep. If anyone could help me that would be great. Thanks!
    :
    : In the KeyDown event, set e.Handled = True and e.SuppressKeyPress =
    : True.
    :
    : Best Regards,
    : Richard
    :
    : The way I see it... Well, it's all pretty blurry

    Thanks it works perfectly!
    James
    James98765
    [email protected]
    http://www.programmersheaven.com/c/Settings/messageboard.htm
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories