Results 1 to 3 of 3

Thread: Sending mouse clicks as a SendKey

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    IL
    Posts
    39

    Post

    This is worthless to me ...

    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 MOUSEEVENTF_LEFTDOWN = &H2
    Private Const MOUSEEVENTF_LEFTUP = &H4
    Private Sub Command1_Click()
    mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
    End Sub


    I do not know where and how to put all that in my program. Can you be more specific?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    It's pretty self explanitory..

    You place the Declaration and Constants in either a Module, (As Public), or a Specific Form, depending on how many places you want to use it.

    Then you call the line:

    mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0

    Where Ever you want to Initiate a Mouse Click over the Current Mouse Location.

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    ajyoung@pressenter.com


  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    IL
    Posts
    39

    Post

    Thank you very much, It works now =)

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