Click or drag to resize

DragEvent Class

X#
Provide information about a drag event, which enables the drag-and-drop client (the receiving window) to track the progress of the mouse during the drag operation and to identify the files that the user can drop.
Inheritance Hierarchy
Object
  Event
    DragEvent

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax
 CLASS DragEvent INHERIT Event
Request Example View Source

The DragEvent type exposes the following members.

Constructors
  NameDescription
Public methodDragEvent
Construct an event.
Top
Properties
  NameDescription
Public propertyControl
A control object returning the control whenever a drop-and-drag event has occurred inside a control with WS_EX_ACCEPTFILES set. If WS_EX_ACCEPTFILES is TRUE, the control accepts files and triggers a call to its parent Drop() method.
Public propertyFileCount
A numeric value representing the number of files in the drag-and-drop load that generated this drag event.
Public propertyHandle
The pointer to the window where the event occurred
(Inherited from Event.)
Public propertyMessage
A dword representing the Windows API message associated with the given event.
(Inherited from Event.)
Public propertyOrigin
A point representing the location of the mouse in canvas coordinates at the time this drag event was generated.
Public propertyWindow
An object indicating the window or control in which the event occurred. This is helpful, for example, for distinguishing between similar menu events coming from the same context menu attached to different controls.
(Inherited from Event.)
Top
Methods
  NameDescription
Public methodFileName
Return the name of a specified file in the drag-and-drop load that generated this drag event.
Top
Fields
  NameDescription
Public fieldhWnd (Inherited from Event.)
Public fieldlParam (Inherited from Event.)
Public fieldoWindow (Inherited from Event.)
Public fielduMsg (Inherited from Event.)
Public fieldwParam (Inherited from Event.)
Top
Remarks
Drag-and-drop is a GUI convention for moving objects from one place to another. In Windows, the convention only supports files. A drag event occurs when the user drags a group of previously selected files to a new location. Drag events occur in the target window where the selection will be dropped (not in the window where the selection was made).
Tip Tip
Drag events do not occur in the drag-and-drop server (the source of the files)—only in the drag-and-drop client (the target). When the drag enters the client area, the drag event goes to the DragDropClient:DragOver() method of the client. If the drag leaves the client without dropping its files, and the drag-and-drop client has returned TRUE to the DragOver() method, a generic event goes to DragDropClient:DragLeave(). It is then no longer relevant or correct for the application to query the event if it is leaving the client. If the user drops the files, the drag event goes to DragDropClient:Drop().
See Also

Reference