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