set Mouse Position

  • Thread starter Thread starter Mojtaba Faridzad
  • Start date Start date
M

Mojtaba Faridzad

Hi,

by Control.MousePosition we can find the mouse position. but how we can set
the mouse position?

thanks
 
Motjaba,

You can set the position through the static Position property on the
Cursor class. However, it takes the position in screen coordinates.
Switching from control to screen is easy. You just have to pass the point
in control coordinates and pass to those to the PointToScreen method on the
control.

Hope this helps.
 
Hi,
Check out the Cursor.Position property.

Hi,

by Control.MousePosition we can find the mouse position. but how we can set
the mouse position?

thanks
 

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