Is there a method to obtain the (x, y) coordinates of the mouse cursor in a controls DoubleClick event?
As far as I can tell, the position has to be obtained from th
Note: As danbruc pointed out, this won't work on a UserControl, because e is not a MouseEventArgs. Also note that not all controls will even give you a DoubleClick event - for example, a Button will just send you two Click events.
private void Form1_DoubleClick(object sender, EventArgs e)
{
MouseEventArgs me = e as MouseEventArgs;
MouseButtons buttonPushed = me.Button;
int xPos = me.X;
int yPos = me.Y;
}
Gets x,y relative to the form..
Also has the left or right button in MouseEventArgs.