Solved

Move the mouse cursor

Posted on 1998-01-20
2
163 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

Independent Software Vendors: 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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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