有我在此尝试给出了问题的不同解决方案,但也似乎无法避开它。 我想检测移 按Ctrl C下KeyDown
在VB.Net事件。
该KeyPreview
属性设置为true我的形式。
我试过是:
If e.Modifiers = (Keys.Shift And Keys.Control) And e.KeyCode = Keys.C Then
'do the action
End If
任何帮助将非常感激!
有我在此尝试给出了问题的不同解决方案,但也似乎无法避开它。 我想检测移 按Ctrl C下KeyDown
在VB.Net事件。
该KeyPreview
属性设置为true我的形式。
我试过是:
If e.Modifiers = (Keys.Shift And Keys.Control) And e.KeyCode = Keys.C Then
'do the action
End If
任何帮助将非常感激!
你的问题的意见是正确的:
If (e.KeyCode = Keys.C AndAlso e.Modifiers = (Keys.Control Or Keys.Shift)) Then
'Do what you want here
End If
如果你想给你的表格上任何地方发生,你需要把KeyPreview
您的Form
来True
。
然后,您可以把它放在Form_KeyDown