Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Move the mouse cursor

What are the possibilities that I have to move the mouse cursor to a specified position in Delphi 2.0?
0
e4muell1
Asked:
e4muell1
  • 2
1 Solution
 
ZifNabCommented:
What about sending a WM_MOUSEMOVE message?
0
 
ZifNabCommented:
Sorry, it's even easier :

procedure PlaceMouse(x, y: word);
var
  tp: TPoint;
begin
  tp := ClientToScreen(point(x, y));
  SetCursorPos(tp.x, tp.y);
end;
procedure PlaceMouse(x, y: word);
var
  tp: TPoint;
begin
  tp := ClientToScreen(point(x, y));
  SetCursorPos(tp.x, tp.y);
end;

{ This code came from Lloyd's help file! }

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now