procedure TForm1.Button1Enter(Sender: TObject);
var
cntrl: TControl;
xCent, yCent: Integer;
point: TPoint;
begin
cntrl := TControl(Sender);
xCent := cntrl.Left + (cntrl.Width div 2);
yCent := cntrl.Top + (cntrl.Height div 2);
point := ClientToScreen(Point(xCent, yCent));
SetCursorPos(point.X,point.Y);
end;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment