Results 1 to 3 of 3

Thread: Using the menu strip causing problem

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2009
    Posts
    1,103

    Post Using the menu strip causing problem

    i created a menu strip named file

    in file menu strip there is an option named Open

    to access the file menu strip uaing keys "Alt+F",i changed the text to "&File"
    and its working properly.

    but what should i do to access the open menu strip item?

    i did the following but its not working:
    Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
    If e.Control = True And e.KeyCode = Keys.O Then
    Me.OpenToolStripMenuItem.PerformClick()
    End If
    End Sub

  2. #2
    Lively Member
    Join Date
    Oct 2007
    Location
    Upper Midwest
    Posts
    123

    Re: Using the menu strip causing problem

    Why not do something like O&pen for the text and use Alt+P to open the "Open" option?

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Using the menu strip causing problem

    Please keep each topic to a single thread.

    http://www.vbforums.com/showthread.php?t=575498

    You should be doing two things:

    1. Set the Text of your menu item to "&Open", which will allow it to be activated by pressing Alt+F followed by Alt+O.

    2. Set the ShortcutKeys property to Ctrl+O, which will allow it to be activated by pressing Ctrl+O.

    I've already provided the second piece of information in your other thread, which is exactly why you don't ask the same question in more than one place. You end up wasting people's time by their posting information that you've already been provided with elsewhere. One topic per thread and one thread per topic please.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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