摘要: 有的时候需要验证文本框中输入的字符是否为数字,现在我找到了两种解决办法,和大家分享一下:第一种,在TextBox的KeyPress中判断:private void txbSleep_KeyPress(object sender, KeyPressEventArgs e) { if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b')) { e.H... 阅读全文
posted @ 2010-09-08 12:19 橘子西瓜 阅读(1461) 评论(0) 推荐(1)