c# textbox控件keydown事件里怎么区分左右shift键
1个回答
展开全部
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.LShiftKey:
textBox1.Text = "左";
break;
case Keys.RShiftKey:
textBox1.Text = "右";
break;
}
e.Handled = true;
this.Focus();
}
经过测试,标准答案
{
switch (e.KeyCode)
{
case Keys.LShiftKey:
textBox1.Text = "左";
break;
case Keys.RShiftKey:
textBox1.Text = "右";
break;
}
e.Handled = true;
this.Focus();
}
经过测试,标准答案
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询