How do I fetch current cursor position

  • Thread starter Thread starter tony
  • Start date Start date
T

tony

Hello!

Assume I catch a double click in a form by using the event handler that
forms designer create for me.

Now to my question when I double click in the form the event handler is
trigged but when I'm in this event handler I want to find out the cursor
position(x,y cordinates) where the double click occurred how is that done?

//Tony
 
you can capture mouse coordinates from argument on events MouseDown and
MouseUp

you can capture these events and hold position in private member and
use it later in MouseDoubleclick event handler if you need it there

hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com
 
Cursor.Position

//Relative to Screen
this.PointToScreen(Cursor.Position);

//Relative to Client
this.PointToClient(Cursor.Position);
 

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