textbox输入数字
来源:互联网 发布:java程序员进阶书籍 编辑:程序博客网 时间:2024/04/29 15:57
private void txtVaInt_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar == 3) || (e.KeyChar == 24) || (e.KeyChar == 22))
{
return;
}
if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8 && e.KeyChar != 13 && e.KeyChar != 45)
{
e.Handled = true;
}
if (e.KeyChar == 45 && (((TextBox)sender).SelectionStart != 0 || ((TextBox)sender).Text.IndexOf("-") >= 0))
{
e.Handled = true;
}
if (e.KeyChar == 48 && (((TextBox)sender).SelectionStart == 0))
{
e.Handled = true;
}
}
- TextBox只输入数字
- TextBox只输入数字
- textBox只能输入数字
- textbox输入数字
- TextBox只输入数字
- TextBox只能输入数字
- TextBox只能输入数字
- textbox 只能输入数字
- 让textbox只能输入数字
- 限制TextBox只能输入数字
- 只能输入数字的TextBox
- TextBox只允许输入数字
- c# Textbox 只能输入数字
- textbox只能输入数字和.
- TextBox只允许输入数字
- C#textbox只能输入数字
- TextBox 只允许输入数字
- 控制TextBox只能输入数字
- application、session、request、page
- Cacti监控华为交换机不显示端口解决办法
- Java 搜索引擎的实现—— 网络爬虫
- 九九乘法表
- TUP:分享产品背后的技术和用户体验 -- 转发 --
- textbox输入数字
- xml序列化实现最近打开
- gwt gxt 中文乱码问题。。。
- 控件添加事件
- 2010-9-9
- kernel and patch
- C++的异常机制
- 提示
- js遍历xml文件学习