摘要: 在文本框的 KeyPress 事件中写下这些代码就可以保证是正整数了 private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (!(Char.IsNumber(e.KeyChar) || e.KeyChar == '\b')) { e.Handled = true; } } 阅读全文
posted @ 2013-06-18 00:14 有创软件工作室 阅读(2358) 评论(0) 推荐(0) 编辑