I\'ve build a simple program (so far) that has a large panel as the \"WorkArea\" of the program. I draw a grid onto it, have some functionality that snaps my cursor to clos
WinForms:
The method Control.PointToClient lets you convert the mouse position relative to the control itself.
Point point = grid.PointToClient(new Point(e.X, e.Y))
WPF:
Using Mouse.GetPosition you can get the position of the mouse relative to a specific control:
Point position = Mouse.GetPosition(grid);