dcsimg
Results 1 to 6 of 6

Thread: [RESOLVED] Shift + menu item

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    3

    Resolved [RESOLVED] Shift + menu item

    (VB5) How do I determine if the Shift key is down when a menu item is clicked?

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    19,160

    Re: Shift + menu item

    Don't bother.

    The keyboard has a well-defined behavior in menu navigation. Trying to change how menu navigation works is a UI fail.

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,450

    Re: Shift + menu item

    Though dilettante is somewhat blunt, can't really argue his point.

    However, your menu items have a click event. Using APIs (GetKeyState), you can determine if the shift key is down or not within that click event.

    Welcome to the forum
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    3

    Re: Shift + menu item

    Thank you for your replies. I will check out that API thing.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,450

    Re: Shift + menu item

    Should be able to find examples by searching this forum for that API function.

    Once this problem is resolved, remember to mark it as such using the "Thread Tools" menu near the top of your 1st post above
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    3

    Re: Shift + menu item

    I found an example and it worked like a charm. Thanks again.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width