ComponentOne True DBInput Pro 8.0
OLEGiveFeedback Event (TDBMask)

 

Reference> TDBMask Control> TDBMask Control Events> OLEGiveFeedback Event (TDBMask)

OLEGiveFeedback Event (TDBMask)

Occurs after every OLEDragOver event. OLEGiveFeedback allows the source component to provide visual feedback to the user, such as changing the mouse cursor to indicate what will happen if the user drops the object, or provide visual feedback on the selection (in the source component) to indicate what will happen.

Syntax

control_OLEGiveFeedback (Effect As Long, DefaultCursors As Boolean)

Arguments

effect is a long integer set by the target component in the OLEDragOver event specifying the action to be performed if the user drops the selection onto it. This allows the source to take appropriate action. (visual feedback, and so on)

Valid settings for the effect parameter are as follows:

0

None. Drop target cannot accept the data.

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.

defaultcursors is a Boolean value which determines whether Visual Basic uses the default mouse cursor proved by the component, or uses a user-defined mouse cursor. True (default) = use default mouse cursor.

Remarks

If there is no code in the OLEGiveFeedback event, or if the defaultcursors parameter is set to True, then Visual Basic automatically uses the mouse cursor to the default cursor provided by the component.

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.

For example, a source component should not compare an effect against, say, dbiDropEffectCopy, such as in this manner:

If Effect = dbiDropEffectCopy...

Instead, the source component should mask for the value or values being sought, such as this:

If Effect And dbiDropEffectCopy = dbiDropEffectCopy...

or:

If (Effect And dbiDropEffectCopy)...

This allows for the definition of new drop effects in future versions while preserving backwards compatibility with your existing code.

Notes

If the state parameter is dbiLeave, indicating that the mouse pointer has left the target, then the X and Y parameters will contain zeros.

See Also

OLEDragOver Event (TDBMask)

 

 


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

Product Support Forum  |  Documentation Feedback