I
import
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure MoveMouseToControl(AControl:TWinControl);
var
rect:trect;
begin
rect:=AControl.BoundsRect;
MapWindowPoints(AControl.Parent.Handle,0,rect,2);
SetCursorPos(rect.Left+(rect.Right-rect.Left) div 2,rect.Top+(rect.Bottom-rect.Top) div 2);
end;
var
rect:trect;
begin
rect:=AControl.BoundsRect;
MapWindowPoints(AControl.Parent.Handle,0,rect,2);
SetCursorPos(rect.Left+(rect.Right-rect.Left) div 2,rect.Top+(rect.Bottom-rect.Top) div 2);
end;