I am trying to make an application in Visual Basic.NET which stimulates mouse left click.
I am using SendMessageA API with message WM_LBUTTONUP
I found out that the reason for this is that i need to pass lparam as follows:-
lower order word
and
high order word specifying the y co-ordinate
How do i achive the same using VB.NET

How to stimulate a mouse left click when the x, y co-ordinates are provided
WillHart
Private shared function Curpos() as position
return cursor.position
end function
This will give you screen coordinates.
MalG
Telophase,
Anytime...
That user name looks familiar. Have you ever posted on feminist boad or lists
Reggaeton_King
Silly me, i need to work more on bitwise operators
Anyways, thanks a lot ReneeC !!
Cassie1
Hi telophase,
Yeah ....I was confused about what you were asking about. I thought may have been asking about SendMessage.
But I still need more clarification from you. Are you asking where do you get that from to pass to via SendMessage or how do you pass the arguments
I think you want to do this:
Static a as integer = (x << 16) OR y
SendMessageA(hwnd, WM_LBUTTONUP< XML:NAMESPACE PREFIX = PH /> ,0, a )
mahmut
What i meant was that how do i pass the screen co-ordinates to the SendMessageA function
Here's what i mean.... :-
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Integer) As Integer
'My Function
Public Sub Stimulate_Click(hwnd as integer,x as integer,y as integer)
SendMessageA(hwnd,WM_LBUTTONUP
End Sub