Chapter 11. Advanced Topics in Windows Forms

Windows users fall into two general categories:
use the keyboard use the mouse

Drag and drop: same as cutting and pasting using keyboard

11.1 Drag-Drop (P523)
Sequence of events Dragging is initiated (call DoDragDrop for the source ) The DoDragDrop method takes two parameters:
data allowedEffects
A new DataObject object is automatically created.

Raises the GiveFeedback event. (display a custom mouse pointer during the drag) Control with AllowDrop =True can receive drop. DragEnter raised (mouse pass).
GetDataPresent :make sure that the format of the data Effect property is used to display the appropriate mouse pointer.

DragDrop: extracts the data from the DataObject

2

11.1 Drag-Drop (P523)
Target control Source control AllowDrop=true +MouseDown -TXT1.DoDragDrop