I have a form with two buttons. I would like to add keyboard shortcuts for those buttons and have looked through all of the postings I could find on this topic. I did see one post which had the code below.
It works for the first time that the user presses F2 but only that one time. Can you please help out a newbie?
vb Code:
Private Sub PB_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.F2 Then MsgBox("pushed F2") End If End Sub




Reply With Quote