Results 1 to 9 of 9

Thread: vbkeyAlt?

  1. #1

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342

    vbkeyAlt?

    Would there be a way that i Could get vbkeyAlt? Or is there an Ascii Value that i could get for Alt keypress? Thanks!
    -squaK

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    VB Code:
    1. Private Sub Form_MouseDown(Button As Integer, _
    2.       Shift As Integer, X As Single, Y As Single)
    3.    ShiftTest = Shift And 7
    4.    Select Case ShiftTest
    5.       Case 1 ' or vbShiftMask
    6.          Print "You pressed the SHIFT key."
    7.       Case 2 ' or vbCtrlMask
    8.          Print "You pressed the CTRL key."
    9.       Case 4 ' or vbAltMask
    10.          Print "You pressed the ALT key."
    11.       Case 3
    12.          Print "You pressed both SHIFT and CTRL."
    13.       Case 5
    14.          Print "You pressed both SHIFT and ALT."
    15.       Case 6
    16.          Print "You pressed both CTRL and ALT."
    17.       Case 7
    18.          Print "You pressed SHIFT, CTRL, and ALT."
    19.       End Select
    20. End Sub

  3. #3

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    yea i saw that code when i searched. Problem Is, I need it a definite Ascii Value.
    -squaK

  4. #4

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    So.. no one know's how?
    -squaK

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Why do you need an ascii value?


    Has someone helped you? Then you can Rate their helpful post.

  6. #6

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    nvm, I figured out a way that i could use the previous code.
    -squaK

  7. #7

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    nvm. I cant use it. I need to get a vbkey or ascii doing here:

    VB Code:
    1. If GetAsyncKeyState( [COLOR=red]Alt Here[/COLOR] )
    -squaK

  8. #8
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    The keycode constant for the ALT key is called vbKeyMenu.

  9. #9

    Thread Starter
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    THANK YOU! That's what i was looking for.
    -squaK

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