Fired when a source component is dropped onto
the control
[Visual Basic .NET] |
---|
Public Event OLEDragDrop( _
ByVal Data As AgDataObject, _
ByVal Effect As Integer, _
ByVal Button As Integer, _
ByVal Shift As Integer, _
ByVal X As Integer, _
ByVal Y As Integer _
)
|
[Managed C++] |
---|
public: void OLEDragDrop(
|
- Data
- A DataObject object containing the list of files dropped onto the control.
- Effect
- A long integer set by the target component identifying the action that has been performed (if any), thus allowing the source to take appropriate action if the component was moved (such as the source deleting the data).
- Button
- 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
- 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 were depressed, the value of Shift would be 6.
- X
- Returns a number that specifies the x-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the screen coordinate system.
- Y
- Returns a number that specifies the y-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the screen coordinate system.
The Map control supports manual and automatic OLE drag and drop events. This event is triggered or not based on the state of the OLEDropMode property: it is triggered only if the OLEDropMode property is set to manual.
Only dropping files is currently supported. The mouse is used to drag and drop data between applications and controls. For example, you can select a set of files in the Windows Explorer. You can then press and hold the mouse button down while dragging the files, then release the mouse button to drop them onto the Map control. During the OLE drag-and-drop operation, the mouse cursor changes to indicate that an OLE drag-and-drop operation is in effect.
[Visual Basic .NET] | Copy Code | |
---|---|---|
|