Solved

Mouse pointer postion

Posted on 2004-04-01
4
158 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now