Check for shift key modifier during commandbutton press

Discussion in 'AutoCAD' started by AKS, Jun 24, 2004.

  1. AKS

    AKS Guest

    Sometimes I want Commandbuttons to perform a different task when
    modified by a shift key. I cannot find a way to do this other than by
    using a Label that is made to look and behave like a Commandbutton.
    This works fine except for slight vertical text centering shift and
    the extra effort invovled. Is there an easier way to do this? I'm
    using 2004.

    Thanks,
    AKS
     
    AKS, Jun 24, 2004
    #1
  2. AKS

    Anthony Ryan Guest

    Hi there,

    You could look at the GetKeyboardState API to test if the shift key
    was pressed when the code for the commandbutton is pressed

    Anthony
     
    Anthony Ryan, Jun 25, 2004
    #2
  3. AKS

    aks Guest

    Thanks Anthony. This worked great and has allowed for a new dimension
    to Acad VBA interface options. For example, while within a select
    element operation one can test for key modifiers that signal the VBA do
    perform variations to its normal operation. So while running the same
    command it is possible to perform different command variations on the
    fly. Thanks again.
     
    aks, Jul 21, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.