Capturing when the user hits the enter key.
The Code:
private void btnNew_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter)
{
this.FunctClassNew();
}
}
When this code is executed the enter key executes twice. If I change "Keys.Enter" to "Keys.E" and hit the key "E" to execute the function it only executes once. Anyone have any ideas?
|