Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Menu ShortCut

Menu ShortCut

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    beowulfagate
    wrote on last edited by
    #1

    Can it be determined if the user presses a menu or if the user uses a shortcut? Both actions result in the same code being run, I just wanted a slightly different behavior between the ShortCut and the Menu.

    D 1 Reply Last reply
    0
    • B beowulfagate

      Can it be determined if the user presses a menu or if the user uses a shortcut? Both actions result in the same code being run, I just wanted a slightly different behavior between the ShortCut and the Menu.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      That doesn't follow proper GUI standards at all. If the user presses a keyboard shortcut for a menu item, it should do EXACTLY the same thing as clicking on that menu item. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      B 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That doesn't follow proper GUI standards at all. If the user presses a keyboard shortcut for a menu item, it should do EXACTLY the same thing as clicking on that menu item. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        B Offline
        B Offline
        beowulfagate
        wrote on last edited by
        #3

        Yeah, I know. But could it be done?

        D 1 Reply Last reply
        0
        • B beowulfagate

          Yeah, I know. But could it be done?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          There is nothing in the MenuItem event handlers that will expose this kind of information. You could try to use the OnKeyDown and OnKeyUp events to track what keys are being used just before the Click event fires on the MenuItem object, but I don't see this as a good or even flexible option to use. Is that much code really worth the odd (and non-intuitive) interface? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups