Solved

Mouse pointer postion

Posted on 2004-04-01
4
162 Views
Last Modified: 2010-04-05
How can I shift mouse pointer to (x,y).
0
Comment
Question by:sal1150
[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
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

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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