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);
 
Back
Top