Handle the KeyDown
event and have something like:
if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.Up)
{
MessageBox.Show("My message");
}
The event handler has to be on the Main Form and you need to set the KeyPreview
property to true
. This can be done in design mode from the properties dialog.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…