Results 1 to 3 of 3

Thread: Small Window

  1. #1

    Thread Starter
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335
    Hi all, sorry I was away for a while, it's because my pc crashed, but now it's fixed and even improved
    Well, here is my question:
    I want to do that when ever a user middle-clicks in the mouse, it will launch my app. My app will have several command buttons.
    2 for both scrollbars in the active window (not my app, something like IE).
    For those who don't know what I mean, check Logitech's new feature in their mouse drivers.
    A command button for pop-uping the menus in the active window etc.
    How do I control the active window's scrollbars and how can I pop my app whenever a middle-click is made?
    ThanX for any help.
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  2. #2
    Guest
    To scroll a Window: use WindowFromPoint to get the Window the mouse is over and use ScrollWindowEx to scroll the window.

    To make an App Pop-up when the middle button is pressed, use GetAsyncKeyState.

    Add the following to a Form with a Timer.
    Code:
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    
    Private Sub Form_Load()
        Timer1.Interval = 1
    End Sub
    
    Private Sub Timer1_Timer()
        If GetAsyncKeyState(vbMiddleButton) Then Shell "MyApp.exe", 1
    End Sub

  3. #3

    Thread Starter
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335
    Very big thanX Megatron, but how do I scroll another window?
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

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