ComponentOne VSFlexGrid 8.0
OLEDragOver Event

Fired when a component is dragged over another.

Syntax

Private Sub VSFlexGrid_OLEDragOver(Data As VSDataObject, Effect As Long,  ByVal Button As Integer,  ByVal Shift As Integer,  ByVal X As Single,  ByVal Y As Single, State As Integer)

Remarks

The parameters for the OLEDragOver event are described below:

Data As VSDataObject

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

Effect As Long

A long integer initially set by the source object identifying all effects it supports. This parameter must be correctly set by the target component during this event. The value of effect is determined by logically ordering together all active effects. The target component should check these effects and other parameters to determine which actions are appropriate for it, and then set this parameter to one of the allowable effects (as specified by the source) to specify which actions will be performed if the user drops the selection on the component. The possible values are:

 

Constant

Value

Description

VbDropEffectNone

0

Drop operation was cancelled.

VbDropEffectCopy

1

Drop results in a copy from the source to the target. The original data remains.

VbDropEffectMove

2

Drop moves the data from the source to the target. The original data should be deleted.

 

Button As Integer

An integer which 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. These bits correspond to the values 1, 2, and 4, respectively. It indicates the state of the mouse buttons; some, all, or none of these three bits can be set, indicating that some, all, or none of the buttons are depressed.

Shift As Integer

An integer which 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. These bits correspond to the values 1, 2, and 4, respectively. The shift parameter indicates the state of these keys; some, all, or none of the bits can be set, indicating that some, all, or none of the keys are depressed. For example, if both the CTRL and ALT keys are depressed, the value of shift would be 6.

X, Y As Single

These parameters specify the current location of the mouse pointer, in twips.

State As Integer

An integer that corresponds to the transition state of the control being dragged in relation to a target form or control. The possible values are:

 

Constant

Value

Description

vbEnter 

0

Source component is being dragged within the range of a target.

vbLeave

1

Source component is being dragged out of the range of a target.

vbOver  

2

Source component has moved from one position in the target to another.

 

For an example of implementing OLE drag and drop with the VSFlexGrid control, see the OLE Drag and Drop Demo.

 

 


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

Product Support Forum  |  Documentation Feedback