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(ByVal UseFolderData As Boolean, ByVal UseDragPicture As Boolean, ByVal xOffset As Single, ByVal yOffset As Single) |
VB | object.OLEDrag(ByVal UseFolderData As Boolean, ByVal UseDragPicture As Boolean, ByVal xOffset As Single, ByVal yOffset As Single) |
C#.NET | void object.OLEDrag(bool UseFolderData, bool UseDragPicture, float xOffset, float yOffset); |
VC++ | HRESULT object->OLEDrag(VARIANT_BOOL UseFolderData, VARIANT_BOOL UseDragPicture, float xOffset, float yOffset); |
C | HRESULT object->raw_OLEDrag(VARIANT_BOOL UseFolderData, VARIANT_BOOL UseDragPicture, float xOffset, float yOffset); |
object
UseFolderData
Defines whether folders are about to be dragged. Set to True to drag the selected folders using the Windows Shell drag & drop mechanisms. Set to False to allow an application to drag application specific data provided using the DataObject object methods and properties.
UseDragPicture
Defines whether a semi-transparent image of the folders is used to represent the data being dragged. Set to True to use a semi-transparent image or set to False to use an application provided cursor.
xOffset
If a semi-transparent image is used (see UseDragPicture), xOffset defines the offset of the image's hotspot relative to the top, left corner of the image. This should be set to -1 to allow the control to determine the best offset. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
yOffset
If a semi-transparent image is used (see UseDragPicture), yOffset defines the offset of the image's hotspot relative to the top, left corner of the image. This should be set to -1 to allow the control to determine the best offset. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
The OLEDrag method initiates an OLE drag & drop operation.
OLE Drag & Drop is not supported with combo box style controls (see ControlStyle property).
An application can invoke an OLE drag & drop operation explicitly using the OLEDrag method.
When the OLEDrag method is called, the OLEStartDrag event occurs, allowing the application to supply data to a target component.
If the OLEDragMode property is set to OLEDragSftControlAutomatic, the OLEDrag method is automatically invoked when an OLE drag & drop operation is started by the user.
The OLEDragPix method can be used to provide xOffset and yOffset coordinates in pixels.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftDirectory1.OLEDragMode = SftControlOLEDragModeConstants.OLEDragSftControlManual End Sub Private Sub AxSftDirectory1_DragStarting(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_DragStartingEvent) Handles AxSftDirectory1.DragStarting Dim F As SftDirectoryFolder F = AxSftDirectory1.CurrentFolder If Not F Is Nothing Then AxSftDirectory1.OLEDrag(False, True, -1, -1) End If End Sub Private Sub AxSftDirectory1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_OLEStartDragEvent) Handles AxSftDirectory1.OLEStartDrag e.data.Clear() e.data.SetData(Nothing, SftOLEClipboardConstants.sftCFText) e.allowedEffects = 1 'vbDropEffectCopy
SftDirectory1.OLEDragMode = OLEDragSftControlManual End Sub Private Sub SftDirectory1_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, _ ByVal xPos As Single, ByVal yPos As Single) Dim F As SftDirectoryFolder Set F = SftDirectory1.CurrentFolder If Not F Is Nothing Then SftDirectory1.OLEDrag False, True, -1, -1 End If End Sub Private Sub SftDirectory1_OLEStartDrag(Data As SftDirectoryLib30.DataObject, _ AllowedEffects As Long) Data.Clear Data.SetData , sftCFText
axSftDirectory1.OLEDragMode = SftControlOLEDragModeConstants.OLEDragSftControlManual; } private void axSftDirectory1_DragStarting(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_DragStartingEvent e) { SftDirectoryFolder f; f = axSftDirectory1.CurrentFolder; if (f != null) { axSftDirectory1.OLEDrag(false, true, -1, -1); } } private void axSftDirectory1_OLEStartDrag(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_OLEStartDragEvent e) { e.data.Clear(); e.data.SetData(null, SftOLEClipboardConstants.sftCFText);
} void COLEDragDlg::OnDragStartingSftDirectory1(short Button, short Shift, long xPos, long yPos) { ISftDirectoryFolderPtr pFolder; pFolder = m_vDir1->CurrentFolder; if (pFolder) m_vDir1->OLEDrag(VARIANT_FALSE, VARIANT_TRUE, -1, -1); } void COLEDragDlg::OnOLEStartDragSftDirectory1(LPDISPATCH FAR* Data, long FAR* AllowedEffects) { IVDMDataObjectPtr pData(*Data); pData->Clear();
See Also SftDirectory Object | Object Hierarchy