private void txtPrice_KeyPress(object sender, KeyPressEventArgs e)
{
if (!((e.KeyChar >= '0' && e.KeyChar <= '9') || e.KeyChar == '.' || e.KeyChar == ''))
{
e.Handled = true;
}
else
{
if (e.KeyChar == '.')
{
string str = txtPrice.Text;
int num = str.IndexOf('.');
if (num != -1)
{
e.Handled = true;
}
}
}
}
相关文章:
-
2022-12-23
-
2022-12-23
-
2022-01-17
-
2021-10-01
-
2022-12-23
-
2021-10-23
猜你喜欢
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2022-12-13
-
下载
2021-06-05
-
下载
2022-12-16