SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/NET 2.0 - Tree Control
Initiates an OLE drag & drop operation.
| VB.NET | object.OLEDrag() |
| VB | object.OLEDrag |
| C#.NET | void object.OLEDrag(); |
| VC++ | HRESULT object->OLEDrag(); |
| C | HRESULT object->raw_OLEDrag(); |
object
The OLEDrag method initiates an OLE drag & drop operation.
When the OLEDrag method is called, the OLEStartDrag event occurs, allowing the application to supply data to a target component.
An application can invoke an OLE drag & drop operation explicitly using the OLEDrag method.
If the DragMethod property is set to dragSftTreeOLE, the OLEDrag method is automatically invoked when a drag & drop operation is started by the user, depending on the DragType property.
Dim sendingImage As Image = OLECvt.ToImage(img.Picture)
Data.SetData(DataFormats.Bitmap, True, sendingImage)
DoDragDrop(Data, DragDropEffects.Copy)
End Sub
Private Sub AxSftTree1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftTreeLib80._DSftTreeEvents_OLEStartDragEvent) Handles AxSftTree1.OLEStartDrag
' This section demonstrates drag&drop) using OLE mechanisms built into this control
' THIS CODE IS ONLY USED IF DRAGMETHOD IS SET TO ( 3 - OLEDrag ) or SftTreeDragMethodConstants.dragSftTreeOLE
Dim curr As Integer
curr = AxSftTree1.Items.Current
' cell text
e.data.SetData(AxSftTree1.get_Cell(curr, 0).Text, SftOLEClipboardConstants.sftCFText)
Image sendingImage = OLECvt.ToImage(img.Picture);
data.SetData(DataFormats.Bitmap, true, sendingImage);
DoDragDrop(data, DragDropEffects.Copy);
}
private void axSftTree1_OLEStartDrag(object sender, AxSftTreeLib80._DSftTreeEvents_OLEStartDragEvent e) {
// This section demonstrates drag&drop) using OLE mechanisms built into this control
// THIS CODE IS ONLY USED IF DRAGMETHOD IS SET TO ( 3 - OLEDrag ) or SftTreeDragMethodConstants.dragSftTreeOLE
int curr = axSftTree1.Items.Current;
// cell text
e.data.SetData(axSftTree1.get_Cell(curr, 0).Text, SftOLEClipboardConstants.sftCFText);
// item picture
SftPictureObject img = null;
if (axSftTree1.get_Item(curr).Image.Type == SftPictureTypeConstants.sftTypeIDispatch) {See Also SftTree Object | Object Hierarchy
