Results 1 to 4 of 4

Thread: [2005][Resolved] Toolstrip Shorcut Question

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2007
    Posts
    24

    [2005][Resolved] Toolstrip Shorcut Question

    Okay, I have a tool strip and it has a shortcut for a button.
    Code:
        Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
            Me.KeyPreview = True
            If e.KeyCode = Keys.Enter Then
                e.SuppressKeyPress = True
                Go1.PerformClick()
            End If
        End Sub
    But when the program first loads I have to press on the main form to make the shortcut be able to be used. How can I get around this?

    Thank you,
    Adam
    Last edited by admeech29; Mar 26th, 2007 at 10:48 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width