Control.PointToClient Method (Point)
Computes the location of the specified screen point into client coordinates.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on it is dropped. The OnPaint method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The DragEnter event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The DragDrop event-handling method displays the image on the form, if an Image can be created from the data. Because the DragEventArgs.X and DragEventArgs.Y values are screen coordinates, the example uses the method to convert them to client coordinates.
Available since 1.1