Can Anyone advise?
i found the following code online:
[code=vbnet]
Public Declare Auto Function SetCursorPos Lib "User32.dll " (ByVal X As Integer, ByVal Y As Integer) As Long
Public Declare Auto Function GetCursorPos Lib "User32.dll " (ByRef lpPoint As Point) As Long
Public Declare Sub mouse_event Lib "user32" Alias "mouse_even t" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Const MOUSEEVENTF_LEF TDOWN = &H2 ' left button down
Public Const MOUSEEVENTF_LEF TUP = &H4 ' left button up
Public Const MOUSEEVENTF_MID DLEDOWN = &H20 ' middle button down
Public Const MOUSEEVENTF_MID DLEUP = &H40 ' middle button up
Public Const MOUSEEVENTF_RIG HTDOWN = &H8 ' right button down
Public Const MOUSEEVENTF_RIG HTUP = &H10 ' right button up
[/code]
When i use this code was was part of the code i found:
[code=vbnet]
mouse_event(MOU SEEVENTF_LEFTDO WN, 0, 0, 0, 0)
mouse_event(MOU SEEVENTF_LEFTUP , 0, 0, 0, 0)
[/code]
I get an error...
Please look at attchment...
Can anyone explain it?
James
i found the following code online:
[code=vbnet]
Public Declare Auto Function SetCursorPos Lib "User32.dll " (ByVal X As Integer, ByVal Y As Integer) As Long
Public Declare Auto Function GetCursorPos Lib "User32.dll " (ByRef lpPoint As Point) As Long
Public Declare Sub mouse_event Lib "user32" Alias "mouse_even t" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Const MOUSEEVENTF_LEF TDOWN = &H2 ' left button down
Public Const MOUSEEVENTF_LEF TUP = &H4 ' left button up
Public Const MOUSEEVENTF_MID DLEDOWN = &H20 ' middle button down
Public Const MOUSEEVENTF_MID DLEUP = &H40 ' middle button up
Public Const MOUSEEVENTF_RIG HTDOWN = &H8 ' right button down
Public Const MOUSEEVENTF_RIG HTUP = &H10 ' right button up
[/code]
When i use this code was was part of the code i found:
[code=vbnet]
mouse_event(MOU SEEVENTF_LEFTDO WN, 0, 0, 0, 0)
mouse_event(MOU SEEVENTF_LEFTUP , 0, 0, 0, 0)
[/code]
I get an error...
Please look at attchment...
Can anyone explain it?
James
Comment