c#中如何把F1等系统本身快捷键屏蔽, 并设置为软件自身的
展开全部
正好我前段时间,也在写关于快捷键的代码,顺手发上来
private void dataGridView1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode ==Keys.F1)
{
AddBid();
}
else if (e.KeyCode == Keys.F2)
{
EditBid();
}
else if (e.KeyCode == Keys.F4)
{
DelBid();
}
else if (e.KeyCode == Keys.F3)
{
SearchBid();
}
else if(e.KeyCode == Keys.Escape)
{
thisConnection.Close();
this.Close();
}
}
private void dataGridView1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode ==Keys.F1)
{
AddBid();
}
else if (e.KeyCode == Keys.F2)
{
EditBid();
}
else if (e.KeyCode == Keys.F4)
{
DelBid();
}
else if (e.KeyCode == Keys.F3)
{
SearchBid();
}
else if(e.KeyCode == Keys.Escape)
{
thisConnection.Close();
this.Close();
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询