shortcut key to open form

wilmoslee

Member
Joined
Mar 12, 2010
Messages
9
Programming Experience
1-3
Hi everyone,

Just a quick question, may i know is that possibleto assign the form a shortcut key like crtl 0 to load/open the form?

thanks.

Regards,
Wimos.
 
Maybe this will help

VB.NET:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = System.Windows.Forms.Keys.F11 Then
            MsgBox("F11 Key was pressed")
        End If
End Sub
 
You can make it a menu option in your main form and set the ShortcutKeys property for that menu item.
menu-shortcut2.png
sample code for Click event of menu item:
VB.NET:
Form2.Show()
 
Back
Top