title: How to prevent the enter key from triggering a click event when a button is in focus
body: <p>I'm trying to make a program which can accept button based inputs as well as keyboard based inputs which it then outputs to a text box. However I would like to use the Enter key to trigger the function to output to the text box. However since there are buttons on the form. They will be triggered like a mouse click event when the enter key is pressed. I need to find a way to either make the enter key only trigger the event I want and not to trigger the button. Or I need to find a way to make the buttons never have focus and for the focus always to be on the form itself while still having the buttons be clickable. Any help?</p>
  
  <pre><code>       If e.KeyCode = Keys.Enter Then
          SecondNum = Val(TB_Output.Text)
          ResultEquals()
          TB_Output.Text = Result
      End If
  </code></pre>