I am trying to add an \"KeyPress\" event in a textbox (WinForm)
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);
>
try following steps it will work, bcoz i have tested it.
then type the following code.
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
//press Enter do Something Like i have messagebox below to show "wow"
MessageBox.Show("wow");
}
else
{
}
}