Quantcast
Viewing all articles
Browse latest Browse all 27408

VS 2010 Multi Key Hotkeys

Hello,

I am working on a program and need to be able to use Multi-Key hotkeys to activate other forms w/in the same solution. Below is the bit of code that I am currently trying to use.

Code:

    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.ControlKey And Keys.NumPad1 Then
            GaleOpening.Show()

        End If
    End Sub

When running this, pressing the control key activates the form, but I need the key combination of CTRL+Numpad1 to activate the form, and not just the control key. I have also tried wrapping the 2 keys in () and that did not work either. Any help would be greatly appreciated.

Thanks in advance.

Viewing all articles
Browse latest Browse all 27408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>