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
Defines OLE drag support.
Get
| VB.NET | Mode = object.OLEDragMode As SftControlOLEDragModeConstants |
| VB | Mode = object.OLEDragMode As SftControlOLEDragModeConstants |
| C#.NET | SftControlOLEDragModeConstants Mode = object.OLEDragMode; |
| VC++ | enum SftControlOLEDragModeConstants Mode = object->OLEDragMode; enum SftControlOLEDragModeConstants Mode = object->GetOLEDragMode(); |
| C | HRESULT object->get_OLEDragMode(enum SftControlOLEDragModeConstants* Mode); |
Put
| VB.NET | object.OLEDragMode = Mode As SftControlOLEDragModeConstants |
| VB | object.OLEDragMode = Mode As SftControlOLEDragModeConstants |
| C#.NET | SftControlOLEDragModeConstants object.OLEDragMode = Mode; |
| VC++ | enum SftControlOLEDragModeConstants object->OLEDragMode = Mode; void object->PutOLEDragMode(enum SftControlOLEDragModeConstants Mode); |
| C | HRESULT object->put_OLEDragMode(enum SftControlOLEDragModeConstants Mode); |
object
Mode
Defines OLE drag support.
The OLEDragMode property defines OLE drag support.
OLE Drag & Drop is not supported with combo box style controls (see ControlStyle property).
Once an OLE drag & drop operation is started, the application receives the OLEStartDrag event, which is used to provide data to the DataObject.
If the OLEDragMode property is set to OLEDragSftControlManual, the application can start an OLE drag & drop operation in response to the DragStarting event or any other suitable event.
If the OLEDragMode property is set to OLEDragSftControlAutomatic, the control automatically initiates a drag & drop operation using the Windows Shell mechanisms.
Visual Basic: The DragMode property which is automatically added to the control by Visual Basic also affects the handling of a drag & drop operation. For OLE drag & drop to be available, Visual Basic's DragMode property must be set to vbManual. Please see the Visual Basic documentation for information about the DragMode property and its drag & drop support.
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
Private Sub Form_Load()
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
private void Form1_Load(object sender, System.EventArgs e)
{
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)
{
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
m_vDir1 = m_Dir1.GetControlUnknown();
m_vDir1->OLEDragMode = OLEDragSftControlManual;
return TRUE;
}
void COLEDragDlg::OnDragStartingSftDirectory1(short Button, short Shift, long xPos, long yPos)
{
ISftDirectoryFolderPtr pFolder;See Also SftDirectory Object | Object Hierarchy
