etoshey
etoshey

Reputation: 87

problem in and lparam in sendmessage(delphi)

i want to move the mouse using WM_MOUSEMOVE message.but i do not know how to set lparam value?
please guide to accomplish this.

Upvotes: 0

Views: 1009

Answers (2)

RRUZ
RRUZ

Reputation: 136391

try this

procedure MouseMove(x,y:Integer); 
Begin
mouse_event(MOUSEEVENTF_MOVE or MOUSEEVENTF_ABSOLUTE, x, y, 0, 0);
End;

Bye;

Upvotes: 2

Michael
Michael

Reputation: 55405

WM_MOUSEMOVE is just a notification - it is sent as a result of a mouse moving, it does not cause it to happen.

SetCursorPos can move the cursor to a new position. SendInput can be used to simulate mouse events directly.

Upvotes: 5

Related Questions