# 用户按下的键

设置窗体的KeyPreview为True, 在KeyDown事件中判断按下的键

private void ReportMain_KeyDown(object sender, KeyEventArgs e)
{
    if (e.Control && e.Shift && e.KeyCode == Keys.V)
    {
        MessageBox.Show("Ctrl + Shift + V ");
    }
}
1
2
3
4
5
6
7
Last Updated: 5/10/2024, 10:18:59 PM