Documentation for this section has not yet been entered.
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 DragEventArgs.KeyState 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 DragEventArgs.KeyState 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.
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. |