Wednesday, June 17, 2009

Detect the Ctrl Key plus another key

Make sure the KeyPreview property is set to true
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.Modifiers = Keys.Control Then
            If e.KeyCode = Whatever key ou want
            End If
        End If
End Sub

No comments: