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
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
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 OLEDragMode property is set to OLEDragSftBoxAutomatic, the OLEDrag method is automatically invoked when an OLE drag & drop operation is started by the user.
comboTarget.Items.Add("Another Source Item")
comboTarget.Items.Add("Last Source Item")
comboTarget.Columns.MakeOptimal(0)
comboTarget.Items.RecalcHorizontalExtent(0)
End Sub
Private Sub comboSource_DragStarting(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_DragStartingEvent) Handles comboSource.DragStarting
comboSource.OLEDrag()
End Sub
Private Sub comboSource_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftBoxLib50._ISftBoxEvents_OLEStartDragEvent) Handles comboSource.OLEStartDrag
e.allowedEffects = vbDropEffectCopy Or vbDropEffectMove
Dim textData As String = comboSource.get_Cell(comboSource.Items.Selection, 0).Text
e.data.SetData(textData, SftOLEClipboardConstants.sftCFText)
End Sub
Next
ComboTarget.Items.Selection = ItemIndex
End If
ComboTarget.Columns.MakeOptimal 0
ComboTarget.Items.RecalcHorizontalExtent 0
End Sub
Private Sub ComboSource_DragStarting(ByVal Part As SftBoxLib50.SftBoxPortionConstants, ByVal Button As Integer, ByVal Shift As Integer, ByVal xPos As Single, ByVal yPos As Single)
ComboSource.OLEDrag
End Sub
Private Sub ComboSource_OLEStartDrag(Data As SftBoxLib50.DataObject, AllowedEffects As Long)
AllowedEffects = vbDropEffectCopy Or vbDropEffectMove
Data.SetData ComboSource.Cell(ComboSource.Items.Selection, 0).Text, sftCFText
End Sub
comboTarget.Items.Add("Another Source Item");
comboTarget.Items.Add("Last Source Item");
comboTarget.Columns.MakeOptimal(0);
comboTarget.Items.RecalcHorizontalExtent(0);
}
private void comboSource_DragStarting(object sender, AxSftBoxLib50._ISftBoxEvents_DragStartingEvent e)
{
comboSource.OLEDrag();
}
private void comboSource_OLEStartDrag(object sender, AxSftBoxLib50._ISftBoxEvents_OLEStartDragEvent e)
{
e.allowedEffects = vbDropEffectCopy | vbDropEffectMove;
string textData = comboSource.get_Cell(comboSource.Items.Selection, 0).Text;
e.data.SetData(textData, SftOLEClipboardConstants.sftCFText);
See Also SftBox Object | Object Hierarchy