G
G
gleendo2015-03-13 12:28:05
Delphi
gleendo, 2015-03-13 12:28:05

How to determine mouse coordinates in delphi?

In general, I need to determine the mouse coordinates and write them to the label.
In the mouseMove event I write

Form1.label4.caption := 'X = ' + IntToStr(X) + ' : ' + 'Y = ' + IntToStr(Y);

But nothing happens. How to fix the code so that everything works?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kalapanga, 2015-03-13
@evgeniy8705

And some panel or something else that does not lie in the whole form? Your line will only work when the mouse is moving directly over the "naked" form.

R
Ravil Zaripov, 2015-03-13
@RZaripov

Should only work within a form!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question