c#组合键
来源:互联网 发布:c语言下标运算符 编辑:程序博客网 时间:2024/06/06 04:51
-
- if ((Control.ModifierKeys & Keys.Control) != 0 && e.KeyCode == Keys.H)
- {
- MessageBox.Show("Ctrl + H");
- }
-
-
- if ((Control.ModifierKeys & Keys.Alt) != 0 && e.KeyCode == Keys.H)
- {
- MessageBox.Show("Alt + H");
- }
-
-
- if ((Control.ModifierKeys & Keys.Shift) != 0 && e.KeyCode == Keys.H)
- {
- MessageBox.Show("Shift + H");
- }
-
-
- if ((Control.ModifierKeys & Keys.Control) != 0 &&
- (Control.ModifierKeys & Keys.Alt) != 0 &&
- (Control.ModifierKeys & Keys.Shift) != 0 &&
- e.KeyCode == Keys.H)
- {
- MessageBox.Show("Ctrl + Alt + Shift + H");
- }