110,538
社区成员
发帖
与我相关
我的任务
分享
private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '2' || e.KeyChar == '8')
{
e.Handled = true;
return;
}
if (e.KeyChar < '0' || e.KeyChar>'9')
{
e.Handled = true;
return;
}
}
this.comboBoxNum.Items.RemoveAt(comboBoxNum.SelectedIndex);