this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.OnKeyPress);
//Put this in InitializeComponent
protected void OnKeyPress(object sender,KeyPressEventArgs e)
{
if (e.KeyChar == 13) //This allows for detection of all catchable keys ( to my knowledge )
{
//Cool key stuff here
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.