Demand: In the WinForm application, you sometimes need a real-time check of the following requirements: When the user input does not allow the input, the program is automatically cleared, that is, faithful to the pressing backspace key implementation: in the text (! IsLegality): checksum in block textbox_TextChanged event private void textbox1_TextChanged (object sender, System.EventArgs e) {if // execute {textbox1.Focus () is not valid; SendKeys.Send ( "{backspace}") }}