次の方法で共有


OLEStartDrag Event

Occurs when the OLEDrag method is called.

PROCEDURE Object.OLEStartDrag
LPARAMETERS oDataObject, nEffect

Return Value

  • oDataObject
    An object reference to OLE drag-and-drop DataObject. You can call any of the DataObject methods from within the OLEStartDrag event.

  • nEffect
    The OLE drag operations supported by the drag source. The following table lists the values for nEffect with a description of each action. nEffect is an output parameter and is set to three on entry into event, so you should provide the value for nEffect in this event. For example, to allow only copy operations, set nEffect to 1 (DROPEFFECT_COPY).

    nEffect

    Foxpro.h constant

    Description

    0

    DROPEFFECT_NONE

    Drag source did not support any drag operations.

    1

    DROPEFFECT_COPY

    Drag source supports Copy operations.

    2

    DROPEFFECT_MOVE

    Drag source supports Move operations (the default).

    4

    DROPEFFECT_LINK

    Drag source supports link operations.

    A drag source can support multiple drag operations by adding multiple values together for nEffect. For example, if nEffect is 3, the drag source supports both copy and move drag operations (3 = 1 (copy) + 2 (move)).

Remarks

Applies To: CheckBox | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Image | Label | Line | ListBox | OptionButton | OptionGroup | Page | PageFrame | Shape | Spinner | TextBox | ToolBar

OLEStartDrag is a drag source event. Including NODEFAULT has no effect on the behavior of this method.

See Also

Reference

OLE Drag-and-Drop

OLEDrag Method

OLEDragMode Property

NODEFAULT Command

Other Resources

Events (Visual FoxPro)