Solved

Mouse pointer postion

Posted on 2004-04-01
4
160 Views
Last Modified: 2010-04-05
How can I shift mouse pointer to (x,y).
0
Comment
Question by:sal1150
4 Comments
 
LVL 6

Assisted Solution

by:rbohac
rbohac earned 50 total points
ID: 10735869
0
 

Author Comment

by:sal1150
ID: 10736105
I want to shift its pointer to tcontroll....
example shift it to edit1.
0
 
LVL 26

Assisted Solution

by:Russell Libby
Russell Libby earned 50 total points
ID: 10736602

procedure SetCursorToControl(Control: TControl);
var pt: TPoint;
begin
 
 pt:=Control.ClientToScreen(Point(0, 0));
 SetCursorPos(pt.X, pt.Y)

end;

rbohac deserves the points, as he did answer your original question. Do not assign me any points please.

Regards,
Russell

0
 
LVL 12

Accepted Solution

by:
esoftbg earned 160 total points
ID: 10736674
procedure TForm1.Button1Click(Sender: TObject);
begin
  SetCursorPos(Form1.Left + Edit1.Left + 8, Form1.Top + Edit1.Top + 40)
end;
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

772 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