0

Is there a way that I can use like F1, F2, F3, etc to open a specific form? I would like to have an options form but not have it to where anyone can access it unless they know the Function key to use.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Unhnd_Exception
1

It seems like that code easily be done by settings the main forms keypreview property to true and in the main form handle its keydown event

Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = Keys.F1 Then
            Dim f As New Form
            f.Show()
        End If
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.