How to get the X and Y coordinate...?

Is there an easy way to get the X and Y coordinates. I do not mean for a single form, but for the entire screen...

There must be some windows function, that does that, I just can't find any :-(

Retep
retepAsked:
Who is Participating?
 
simonetCommented:
You can use GetCursorPos or simply use Mouse.CursorPos (mouse is  global variable of type TMouse).

Both will return a TPoint structure:

type TPoint = record
  X: Longint;
  Y: Longint;
end;


So, X is Mouse.CursorPos.X
Y is Mouse.CursorPos.Y

Yours,

Alex
0
 
retepAuthor Commented:
Thank you for the answer Alex. It was driving me crasy to try to find the function, so I'm very pleased :-)

Regards
Peter
0
 
MoondancerCommented:
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.