hi,
what is the difference between keypress and enter events of a button.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
carle laiPosted Sep 23, 2009, 3:34 AM
2) there is nearly no difference between keypress and enter evnets of a button in my mind.
maybe 'enter' is only keydown event.
AlexPosted Sep 13, 2009, 6:14 PM
You can test it by creating a button with two events like the following porley coded example ;) to see how the various events get handled.
private void testkeypress(object sender, KeyPressEventArgs e)
{
textbox1.Text = "keypress";
}
private void testenter(object sender, EventArgs e)
{
textbox2.Text = "enter";
}