ComponentOne True DBInput Pro 8.0
OLEDragDrop Event (TDBDate)

 

Reference> TDBDate Control> TDBDate Control Events> OLEDragDrop Event (TDBDate)

OLEDragDrop Event (TDBDate)

The OLEDragDrop event occurs when a source component is dropped onto a target component, informing the source component that a drag action was either performed or canceled. The source ActiveX component should always mask values from the effect parameter to ensure compatibility with future implementations of ActiveX components. Presently, only three of the 32 bits in the effect parameter are used. In future versions these other bits may be used. Therefore, as a precaution against future problems, drag sources and drop targets should mask these values appropriately before performing any comparisons.

Syntax

control_OLEDragDrop (Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

Arguments

data is a DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method. The SetData and Clear methods cannot be used here.

effect is a long integer set by the target object identifying the action that has been performed, thus allowing the source to take appropriate action if the component was moved.

The possible values of effect are as follows:

0

None. Drop target cannot accept the data, or the drop operation was canceled.

1

Copy. Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation.

2

Move. Drop results in data being moved from drag source to drop source. The drag source should remove the data from itself after the move.

button is an integer that acts as a bit field corresponding to the state of a mouse button when it is depressed. The left button is bit 0, the right button is bit 1, and the middle button is bit 2.

shift is an integer that acts as a bit field corresponding to the state of the [Shift], [Ctrl], and [Alt] keys when they are depressed. The [Shift] key is bit 0, the [Ctrl] key is bit 1, and the [Alt] key is bit 2.

X, Y are single-precision numbers that specify the current location of the mouse pointer.

Remarks

This event occurs only if OLEDropMode is set to 1-Manual.

See Also

OLEDragOver Event (TDBDate)

OLEDropMode Property (TDBDate)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback