DateTime dt = new DateTime(); private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if ((DateTime.Now - dt).Milliseconds > 100) { textBox1.Text = ""; } dt = DateTime.Now; }