Is there a way to start a method in C# if a key is pressed? For example, Esc?
use the OnKeyPress Event of your textbox and in the event
if(e.KeyCode==Keys.Escape) { yourTextBox.Text = string.Empty; }
1.4m articles
1.4m replys
5 comments
57.0k users