October 2003
Intermediate to advanced
736 pages
15h 25m
English
No matter what kind of controls you're using or building, often you'd like to enable the user to drag data from one to another. This communication protocol, known as drag and drop, has long been standardized and is fully supported in WinForms for both targets and sources.
Adding drag and drop to your application involves two elements: the drop target and the drop source. First, you must have a control that supports having things dragged and dropped onto it. This kind of control is known as the drop target. You designate your target by setting the AllowDrop property of the control to true.
Next, you make the target control subscribe to one or more of the drag-and-drop events:
DragEnter is fired when the mouse enters ...