CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    API for mouse movement

    How would one make the mose move and send a click event or dbl-click event thru an API call ?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: API for mouse movement

    there's a mouse_event API. check it out on the platform sdk


  3. #3
    Guest

    Re: API for mouse movement

    I know maybe I am pushing you a bit, but could u give the code for making a mouse move to a certain x,y co-ordinate and then sending the click event thru the API call ?

    I am running on a bare VB setup and dont know the API calls very well.
    Thanx


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: API for mouse movement


    option Explicit
    private Declare Sub mouse_event Lib "user32" (byval dwFlags as Long, byval dx as Long, byval dy as Long, byval cButtons as Long, byval dwExtraInfo as Long)
    private Const MOUSE_MOVED = &H1
    private Const MOUSEEVENTF_ABSOLUTE = &H8000
    private Const MOUSEEVENTF_LEFTDOWN = &H2

    private Sub Command1_Click()
    mouse_event MOUSE_MOVED Or MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0
    mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0
    End Sub






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

Featured