2
我有以下代码:短键按Ctrl + - 工作不动
Private Sub myGrid_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles myGrid.KeyDown
If e.KeyCode = Keys.Divide AndAlso e.Control Then
Dim response = MsgBox("are you sure to delete a record?", vbYesNo)
If response = vbYes Then
//Delete the record
End If
End If
End Sub
此作品(对于按Ctrl + /),但问题是,这适用于任意键不同于-
。如果我指定Keycode是Keys.Subtract(要使用Ctrl + -)它永远不会被捕获!
答案有帮助吗? – Abraham 2013-02-22 06:00:44