Mega Code Archive

 
Categories / Delphi / Forms
 

Place my mouse on a form

Title: Place my mouse on a form Question: How can I place the mouse on a form? Answer: uses Windows; procedure PlaceMyMouse(Sender: TForm; X, Y: word); var MyPoint: TPoint; begin MyPoint := Sender.ClientToScreen(Point(X, Y)); SetCursorPos(MyPoint.X, MyPoint.Y); end;