VSFlexGrid Control > VSFlexGrid Properties, Events, and Methods > VSFlexGrid Properties > OLEDragMode Property |
Returns or sets whether the control can act as an OLE drag source, either automatically or under program control.
[form!]VSFlexGrid.OLEDragMode[ = OLEDragModeSettings ]
The settings for the OLEDragMode property are described below:
Constant |
Value |
Description |
FlexOLEDragManual |
0 |
When OLEDragMode is set to flexOleDragManual, you must call the OLEDrag method to start dragging, which then triggers the OLEStartDrag event. A good place to call the OLEDrag method is in response to the BeforeMouseDown event. |
FlexOLEDragAutomatic |
1 |
When OLEDragMode is set to FlexOleDragAutomatic, the control fills a DataObject object with the data it contains and sets the effects parameter before initiating the OLEStartDrag event when the user attempts to drag out of the control. This gives you control over the drag/drop operation and allows you to intercede by adding or modifying the data that is being dragged. |
For an example of implementing OLE drag and drop with the VSFlexGrid control, see the OLE Drag and Drop Demo.
Note
If the DragMode property is set to Automatic, the setting of OLEDragMode is ignored, because regular Visual Basic drag-and-drop events take precedence.
OLEDragModeSettings (Enumeration)
flexOLEDragManual (0)