Detect (x,y) of the mouse pointer

  • Thread starter Thread starter Diane
  • Start date Start date
D

Diane

On a form I would like to place the mouse and click - then
the coordinates of the mouse should be used in my on-click
event for the form.

How do I get the (x,y) of the mouse pointer?
 
But if the MouseDown event is in a control, it returns the X,Y coordinates
inside that control and not on the form. How does this work if I click on a
control and want to know the XY Coordinates on the form and not within the
control?

Bill
 
But if the MouseDown event is in a control, it returns the X,Y coordinates
inside that control and not on the form. How does this work if I click on a
control and want to know the XY Coordinates on the form and not within the
control?

the control has a .Left and a .Top, if you add it to X and Y you will
get it

If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
Back
Top