MousePosition - offset on Y?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When using Control.MousePosition the x values seems to be just fine when I
draw something on the screen, but the Y value seems to have got an offset -
independently of where on the screen I put the cursor the item I draw is a
fixed offset below the cursor - why is this so?
 
Joachim said:
When using Control.MousePosition the x values seems to be just fine when I
draw something on the screen, but the Y value seems to have got an offset -
independently of where on the screen I put the cursor the item I draw is a
fixed offset below the cursor - why is this so?

The coordinates are screen coordinates. If you want to use the
coordinates to draw on a control, you should use the PointToClient
method on that control to convert the coordinates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top