Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get mouse position over a certain control

Windows Form
I'm using the DragOver event on a layoutpanel and the DragEventArgs returns the X/Y coordinates of the mouse in relation to the screen. I know there is a function to translate this in to the position of the mouse over the control, but I'm having difficulty locating it.

like image 347
Dustin Brooks Avatar asked Jan 21 '09 14:01

Dustin Brooks


1 Answers

Try Control.PointToClient and Control.PointToScreen.

like image 131
mqp Avatar answered Sep 20 '22 15:09

mqp