Updated: October 2008
Specifies the possible effects of a drag-and-drop operation.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
|The drop target does not accept the data.|
|The data from the drag source is copied to the drop target.|
|The data from the drag source is moved to the drop target.|
|The data from the drag source is linked to the drop target.|
|The target can be scrolled while dragging to locate a drop position that is not currently visible in the target.|
|The combination of the Copy, , and effects.|
You can use to display different mouse pointers for drag-and-drop operations. For example, you can display a plus symbol for a drag-and-drop operation, an arrow symbol for a drag-and-drop operation, or a red circle with a line through it symbol for a drag-and-drop operation.
If you want to drop data at a position in the target that is not currently visible, you could scroll the target while dragging. If a target does not support scrolling, you must make sure that the drop position is visible in the target before you begin the drag-and-drop operation. The following are some scenarios when you might want to scroll a target:
You are dragging text into a document, and you want to drop the text at a position not visible in the document window.
You are dragging a file into a file tree, and you want to drop the file on a node not visible in the file tree.
This code example demonstrates using the enumeration when the user moves the mouse over the drop target during a drag-and-drop operation. This code example is part of a larger example provided for the DoDragDrop method of the Control class. See the DoDragDrop method for the complete code example.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.