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 SftMaskOLEDragModeConstants |
VB | Mode = object.OLEDragMode As SftMaskOLEDragModeConstants |
C#.NET | SftMaskOLEDragModeConstants Mode = object.OLEDragMode; |
VC++ | enum SftMaskOLEDragModeConstants Mode = object->OLEDragMode; enum SftMaskOLEDragModeConstants Mode = object->GetOLEDragMode(); |
C | HRESULT object->get_OLEDragMode(enum SftMaskOLEDragModeConstants* Mode); |
Put
VB.NET | object.OLEDragMode = Mode As SftMaskOLEDragModeConstants |
VB | object.OLEDragMode = Mode As SftMaskOLEDragModeConstants |
C#.NET | SftMaskOLEDragModeConstants object.OLEDragMode = Mode; |
VC++ | enum SftMaskOLEDragModeConstants object->OLEDragMode = Mode; void object->PutOLEDragMode(enum SftMaskOLEDragModeConstants Mode); |
C | HRESULT object->put_OLEDragMode(enum SftMaskOLEDragModeConstants Mode); |
object
Mode
Defines whether the control is used as an OLE drag & drop drag source.
Mode | Value | Description |
---|---|---|
OLEDragSftMaskNone | 0 | The control cannot act as a drag source. |
OLEDragSftMaskManual | 1 | The application calls the OLEDrag method to start an OLE drag & drop operation using this control as a drag source. |
OLEDragSftMaskAutomatic | 2 | The control automatically starts an OLE drag & drop operation when a dragging operation is detected and provides default data to the DataObject. |
The OLEDragMode property defines OLE drag support.
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 OLEDragSftMaskManual, 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 OLEDragSftMaskAutomatic, the control automatically adds the text of the currently selected text including literals to the DataObject. The application can modify this behavior using the OLEStartDrag event.
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
AxSftMask1.Caption.SizePercent = 33
AxSftMask1.Caption.Text = "&Filename:"
AxSftMask1.Mask = ""
AxSftMask1.MaxLength = 300
AxSftMask1.PromptUnderline = False
AxSftMask1.AutoComplete.Contents = SftMaskAutoCompleteContentsConstants.contentsSftMaskFilesDirs
AxSftMask1.AutoComplete.DefaultDirectory = "C:\"
AxSftMask1.OLEDragMode = SftMaskOLEDragModeConstants.OLEDragSftMaskManual
End Sub
Private Sub AxAxSftMask1_DragStarting(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_DragStartingEvent) Handles AxSftMask1.DragStarting
If AxSftMask1.SelLength <> 0 Then
AxSftMask1.OLEDrag()
End If
End Sub
Private Sub Form_Load()
SftMask1.Caption.SizePercent = 33
SftMask1.Caption.Text = "&Filename:"
SftMask1.Mask = ""
SftMask1.MaxLength = 300
SftMask1.PromptUnderline = False
SftMask1.AutoComplete.Contents = contentsSftMaskFilesDirs
SftMask1.AutoComplete.DefaultDirectory = "C:\"
SftMask1.OLEDragMode = OLEDragSftMaskManual
End Sub
Private Sub SftMask1_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
If SftMask1.SelLength <> 0 Then
SftMask1.OLEDrag
End If
End Sub
{
axSftMask1.Caption.SizePercent = 33;
axSftMask1.Caption.Text = "&Filename:";
axSftMask1.Mask = "";
axSftMask1.MaxLength = 300;
axSftMask1.PromptUnderline = false;
axSftMask1.AutoComplete.Contents = SftMaskAutoCompleteContentsConstants.contentsSftMaskFilesDirs;
axSftMask1.AutoComplete.DefaultDirectory = @"C:\";
axSftMask1.OLEDragMode = SftMaskOLEDragModeConstants.OLEDragSftMaskManual;
}
private void axSftMask1_DragStarting(object sender, AxSftMaskLib70._ISftMaskEvents_DragStartingEvent e)
{
if (axSftMask1.SelLength != 0) {
axSftMask1.OLEDrag();
}
m_pMask1->Caption->SizePercent = 33;
m_pMask1->Caption->Text = _T("&Filename:");
m_pMask1->Mask = _T("");
m_pMask1->MaxLength = 300;
m_pMask1->PromptUnderline = VARIANT_FALSE;
m_pMask1->AutoComplete->Contents = contentsSftMaskFilesDirs;
m_pMask1->AutoComplete->DefaultDirectory = _T("C:\\");
m_pMask1->OLEDragMode = OLEDragSftMaskManual;
return TRUE;
}
void CProject1Dlg::OnDragStartingSftMask1(short Button, short Shift, float x, float y)
{
if (m_pMask1->SelLength != 0) {
m_pMask1->OLEDrag();
See Also SftMask Object | Object Hierarchy