System.Windows.Forms
1.0.5000.0
2.0.0.0
System.EventArgs
System.Runtime.InteropServices.ComVisible(true)
The event occurs when the user completes a drag-and-drop operation by dragging an object over the control and then dropping it onto the control by releasing the mouse button. The event occurs when the user moves the mouse pointer onto the control while dragging an object with the mouse. The event occurs when the user moves the mouse pointer over the control while dragging an object with the mouse.
A object specifies any data associated with this event; the current state of the SHIFT, CTRL, and ALT keys; the location of the mouse pointer; and the drag-and-drop effects allowed by the source and target of the drag event.
For information about the event model, see [<topic://cpconEventsDelegates>].
Provides data for the , , or event.
Constructor
To be added.
Initializes a new instance of the class.
The data associated with this event.
The current state of the SHIFT, CTRL, and ALT keys.
The x-coordinate of the mouse cursor in pixels.
The y-coordinate of the mouse cursor in pixels.
One of the values.
One of the values.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.DragDropEffects
To be added.
When a control initiates a drag-and-drop operation by calling the method, it specifies the permissible effects of the operation. For example, when you drag a file from a source, if the file is read-only (or from a read-only storage medium such as a CD), the source will indicate that the file can be copied, but not transferred, to the target.
Before attempting to perform an operation on the dragged data, you should examine this property to ensure that the operation is allowed.
Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.IDataObject
To be added.
In the body of your event handler, you can use the method to determine whether the data matches the format requirements of the control onto which the data is being dragged. You also can specify whether you want to attempt to convert the data to meet your format requirements. If the dragged data meets your format requirements, use the method to retrieve the data.
Gets the that contains the data associated with this event.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.DragDropEffects
To be added.
By default, the effect applied determines the mouse cursor for the target of a drag-and-drop operation. This is useful to provide feedback to the user on the operation that will occur. For example, if you press the CTRL key when you drag a file from a source, specify to indicate the target will try to perform a copy operation.
To use custom cursors for a drag operation, see .
Gets or sets the target drop effect in a drag-and-drop operation.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added.
You can make the effect of a drag-and-drop operation to depend on the state of a particular key. For example, you may decide to copy or move data depending on whether the CTRL or SHIFT keys are pressed during the drag-and-drop operation.
The bits that are set in the property identify the keys or mouse buttons that were pressed during the operation. For example, if the left mouse button is pressed, the first bit in the property is set. You can use the bitwise AND operator to test for a given key state.
The following table lists the values that are used for a specified event.
-
Value
Key
-
1 (bit 0)
The left mouse button.
-
2 (bit 1)
The right mouse button.
-
4 (bit 2)
The SHIFT key.
-
8 (bit 3)
The CTRL key.
-
16 (bit 4)
The middle mouse button.
-
32 (bit 5)
The ALT key.
Gets the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added.
To be added.
Gets the x-coordinate of the mouse pointer, in screen coordinates.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added.
To be added.
Gets the y-coordinate of the mouse pointer, in screen coordinates.
1.0.5000.0
2.0.0.0