Results 1 to 3 of 3

Thread: Mouse buttons via API

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    14
    How do I find you which mousebuttons currently being pressed no matter where the mouse-pointer is nor what program or window that has focus?

    AND

    Is there some way of block these clicks, so I could disable right-click?
    Well, it's a pentium parrot, besides, it's only a decimal.

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Private Const VK_LBUTTON = &H1
    Private Const VK_RBUTTON = &H2
    
    Private Sub Timer1_Timer()
     If GetAsyncKeyState(VK_LBUTTON) <> 0 Then MsgBox "Left Mouse Button"
     If GetAsyncKeyState(VK_RBUTTON) <> 0 Then MsgBox "Right Mouse Button"
    End Sub
    Timer interval must be very low (e.g. 1 ms)
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    14

    Talking

    Okay, thanks, it works just fine

    1 down, 1 to go, so if anyone knows how to intercept
    the call that spawns the "right-click" menu and kill it,
    please don't hesitate to write me, your help will be
    greatly appreciated.
    Well, it's a pentium parrot, besides, it's only a decimal.

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