Solved

Move the mouse cursor

Posted on 1998-01-20
2
161 Views
Last Modified: 2010-04-04
What are the possibilities that I have to move the mouse cursor to a specified position in Delphi 2.0?
0
Comment
Question by:e4muell1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357041
What about sending a WM_MOUSEMOVE message?
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 40 total points
ID: 1357042
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question