private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
MessageBox.Show("You pressed the ENTER key.");
}
}
--------------------------------------------------
to identify decimal equivalent of each keys, try this code:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
int x= (int)e.KeyChar;
MessageBox.Show(x.ToString());
}
--------------------------------------------------
***happy coding***
for more decimal representation of each character visit http://www.asciitable.com/
No comments:
Post a Comment