When programming for Windows, you'll sometimes want a container object (a form, a panel, etc.) to handle certain events, such as MouseOver, MouseMove, MouseUp, MouseDown, etc. But what happens if you have other controls in the container? You could write event handlers for each of those controls, but that seems like a lot of duplication of effort.
One solution to this problem is to send the child control's events that you'd like to capture to the event handlers of the container, e.g.
childControl.MouseMove += new MouseEventHandler(ParentControl_MouseMove);
This will send the event to the correct handler, but there is a problem: The parameter e.Location contains the mouse coordinates relative to the control which fired the event. If you want the event handler (which is assuming coordinates relative to the parent control) to behave correctly, you are going to need to translate the coordinates being passed to the handler.
Any class inheriting from Windows.Forms.Control will have a pair of methods, PointToScreen() and PointToClient() These will translate a Point from relative coordinates to screen coordinates, and screen coordinates to relative coordinates, respectively. Screen coordinates are our common denominator, so our solution will be to translate the relative coordinates we've been given into screen coordinates, then translate them from screen coordinates into the relative coordinates of our parent container.
Point mousePoint = parentControl.PointToClient(((System.Windows.Forms.Control)sender).PointToScreen(e.Location));
Voila! mousePoint now contains the mouse coordinates relative to the parent control, and we use that instead of e.Location within ParentControl_MouseMove() to do whatever we need to.