private void textBox1_PreviewTextInput(object sender, TextCompositionEventArgs e){e.Handled = System.Text.RegularExpressions.Regex.IsMatch(e.Text, @"[0-9]+");base.OnPreviewTextInput(e);}
700字范文,内容丰富有趣,生活中的好帮手!
时间:2021-08-17 14:20:10
private void textBox1_PreviewTextInput(object sender, TextCompositionEventArgs e){e.Handled = System.Text.RegularExpressions.Regex.IsMatch(e.Text, @"[0-9]+");base.OnPreviewTextInput(e);}