Occurs when data is dragged over a drop target and the drop target's OLEDropMode property is set to 1 вЂ“ Enabled.
PROCEDURE Object.OLEDragOver LPARAMETERS oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord, nState
- An object reference to OLE drag-and-drop DataObject, used with the GetData and GetFormat methods to return data and data formats in the DataObject.
A value passed to the OLEGiveFeedback event, indicating the action performed if data is dropped on the drop target. nEffect is initially a value that indicates the OLE drag-and-drop operations supported by the drag source. The following table lists the values for nEffect with a description of each action.
nEffect Foxpro.h constant Description
Drop target doesn't accept the data or the drop operation is canceled.
Data is copied from the drag source to the drop target.
Data is moved from the drag source to the drop target.
Data is linked from the drag source to the drop target.
- Contains a number that specifies which mouse button is pressed when data is dragged over a drop target: 1 (left), 2 (right), or 4 (middle).
Contains a number specifying the state of modifier keys when data is dragged over a drop target. The valid modifier keys are the SHIFT, CTRL, and ALT keys. The values returned in nShift for individual modifier keys are listed in the following table.
If more than one modifier key is held down when the mouse is pressed, the nShift argument contains the sum of the values for the modifier keys. For example, if the user holds CTRL while releasing the mouse button, the nShift argument contains 2. But, if the user holds CTRL+ALT while releasing the mouse button, the nShift argument contains 6.
nShift Modifier key
- nXCoord, nYCoord
- Contains the horizontal (nXCoord) and vertical (nYCoord) position of the mouse pointer within the Form when data is dragged over a drop target. These coordinates are expressed in terms of the Form's coordinate system in the unit of measurement specified by the ScaleMode property of the Form.
Contains a number specifying the direction in which the data is dragged вЂ“ into the control or object, within the control or object, or out of the control or object. The values for nState are listed in the following table.
Data is dragged into the control or object. The OLEDropEffects and OLEDropHasData properties can be set when nState is zero.
Data is dragged out of the control or object.
Data is dragged within the control or object.
Applies To: CheckBox | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Image | Label | Line | ListBox | OptionButton | OptionGroup | Page | PageFrame | ProjectHook Object | Shape | Spinner | TextBox | ToolBar
OLEDragOver is a drop target event that only occurs when the OLEDropMode property for the control or object is set to 1 вЂ“ Enabled. This event does not occur if the OLEDropMode property is set to 0 вЂ“ Disabled or 2 вЂ“ Pass to Container.
Note that you should avoid creating wait states in the OLEDragOver event with commands and functions such as WAIT WINDOW and MESSAGEBOX(В ).