公告
财富商城
积分规则
提问
发文
2019-07-28 19:12发布
傲
I cant figure out how to disable whitespaces, I tried multiple things, and yes my mask is 00000000000 but still it allows whitespaces. Anyone know a fix?
Not much code to show, only:
Should only allow numbers to be entered, not whitespaces too :/
Add the KeyDown Event to your textbox and then add the following Code in the created method:
private void textBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) { e.Handled = true; e.SuppressKeyPress = true; return; } }
最多设置5个标签!
Add the KeyDown Event to your textbox and then add the following Code in the created method: