PDA

Click to See Complete Forum and Search --> : Sending mouse clicks as a SendKey


Ant2ne
Jan 28th, 2000, 01:29 AM
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?

Aaron Young
Jan 28th, 2000, 01:51 AM
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

Ant2ne
Jan 28th, 2000, 01:59 AM
Thank you very much, It works now =)