Results 1 to 3 of 3

Thread: F10 Shortcut on menu

  1. #1
    Guest
    Hi:
    I need to add a menu item with the shortcut F10. But apparently there is no combination of F10(F10 / Shift + F10 etc) available on the menu Item dialog box.
    Is there a workaround to this problem?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    ..walk around

    set your menu items.
    for the one with F10
    Caption = FakeIt F10
    name = mnuFakeIt
    shortcut = none

    then add this to your form....
    whenever f10 is press it will execute the code
    you put into it which would be the same code
    as in mnuFakeIt

    ...Hope it helps..



    Option Explicit

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyF10: MsgBox "code for menu here"

    End Select
    End Sub

    Private Sub Form_Load()
    Form1.KeyPreview = True
    End Sub

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    If you want to use F10 as a shortcut key on a menu, you just do:

    Code:
    Private Sub Form_Load()
    mnuabout.caption = "About" & Chr$(9) & "F10"
    End Sub
    And in the Form_Keydown, do as HeSaidJoe said.

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