Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Mouse pointer postion

Posted on 2004-04-01
4
Medium Priority
?
166 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 200 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 200 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 640 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

Technology Partners: 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

916 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