if (e.KeyCode.ToString() == "Return")
{
if (txtValue.Text.Trim() == "")
{
txtValue.Text = "";
MessageBox.Show("请扫描有效条码!");
return;
}
else
{
string FCode = txtValue.Text;
txtValue.Text = "";
this.Printer(FCode);
//光标
this.txtValue.Focus();
}
}
C# 判断是否为回车
最新推荐文章于 2023-01-06 17:01:03 发布