Results 1 to 7 of 7

Thread: Detecting Mouseclick on another application

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Singapore
    Posts
    6

    Cool Detecting Mouseclick on another application

    I am trying to write a test program to detect the windows events, such as mouseclick , text entered in a textfield, a dialogue box opened, etc.

    Could I use the default WIN32 API to detect all windows events?

    How do I do it?

  2. #2
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    You can't hook an external app with VB , the good news is c++ can so you can learn that and do loads of cool stuff

  3. #3
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    You can however obtain the handle to the window or button on the window in another app and then process it accordingly.

    For example if you get the handle to the OK button on a form you can then send the appropriate message from VB to click this button and it will be processed accordingly. This will require you to search for the button to obtain the handle.

    I find this works well. The only thing I have not found you can do is inject a message between when the window is created and the window is shown in another App during startup of the other App.

    If Nucleus or anyone else knows how this can be done using C++
    let me know.

  4. #4
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530

  5. #5
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    Thanks Nucleus.

    EMail Megatron for source code but haven't received.

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Singapore
    Posts
    6
    Thanks Guys,

    I have posted this in another forum and they have recommended a book regarding Hooking in VB. The title is " SubClassing and Hooking in VB" by O'Reilly.

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    Singapore
    Posts
    6
    I am new to API and hooking, any books that you could recommend?

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