TEXT jump and verification

xiaoxiao2021-03-06  67

Using system.text .regulaarXpress;

private void txtChequeCode_KeyDown (object sender, System.Windows.Forms.KeyEventArgs e) {if (e.KeyCode == Keys.Enter) {if (Regex.Match (this.txtChequeCode .Text .Trim (), @ "^ / d $ "). Success) {this.txtchequesum .focus (); this.txtChequesum .select ();} else {messagebox.show (" Influence!, Only allow input numbers ");}}}

private void txtChequeSum_KeyDown (object sender, System.Windows.Forms.KeyEventArgs e) {if (e.KeyCode == Keys.Enter) {if (Regex.Match (this.txtChequeSum .Text .Trim (), @ "^ / d $ "). Success) {this.buttonsave .focus (); this.buttonsave .select ();} else {messagebox.show (" Input invalid!, Only allow input numbers ");}}}

转载请注明原文地址:https://www.9cbs.com/read-90467.html

New Post(0)