Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

DragStarting Event, SftMask Object

The beginning of a drag & drop operation has been detected.

Syntax

VB.NETPrivate Sub object_DragStarting(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.DragStarting
VBPrivate Sub object_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
C#.NETvoid object_DragStarting(object sender, EventArgumentType e);
VC++void OnDragStartingobject(short Button, short Shift, float x, float y);
CHRESULT OnDragStartingobject(short Button, short Shift, float x, float y);

object

A SftMask object.

Button

Describes the button(s) that are pressed. The Button argument is a bit field with bits corresponding to the left button, right button and middle button. These bits correspond to the values shown below. The bits set indicate the button that caused the event.

ButtonValueDescription
constSftMaskLeftButton1The left mouse button was pressed.
constSftMaskRightButton2The middle mouse button was pressed.
constSftMaskMiddleButton4The right mouse button was pressed.

Shift

Describes the state of the SHIFT, CONTROL and ALT keys. A bit is set if the key is down. The Shift argument is a bit field with bits corresponding to the SHIFT, CONTROL and ALT keys. It indicates the state of these keys. Some, all, or none of the bits can be set, indicating which of the keys are pressed.

ShiftValueDescription
constSftMaskShiftMask1The SHIFT key is down.
constSftMaskCtrlMask2The CONTROL key is down.
constSftMaskAltMask4The ALT key is down.

xPos

The x coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

yPos

The y coordinate of the mouse cursor. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Comments

The DragStarting event occurs when the beginning of a drag & drop operation has been detected.

The DragStarting event only occurs when a drag & drop operation is detected. A drag & drop operation is initiated by pressing the left mouse button on the current selection.

The application can start an OLE drag & drop operation in response to other events by using the OLEDrag method.

Examples

VB.NET

    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 AxAxSftMask1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEStartDragEvent) Handles AxSftMask1.OLEStartDrag
    e.data.Clear()

VB6

    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

Private Sub SftMask1_OLEStartDrag(Data As SftMaskLib70.DataObject, AllowedEffects As Long)
    Data.Clear

C#

    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();
    }
}

private void axSftMask1_OLEStartDrag(object sender, AxSftMaskLib70._ISftMaskEvents_OLEStartDragEvent e)

C++

    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();
    }
}

void CProject1Dlg::OnOLEStartDragSftMask1(LPDISPATCH FAR* Data, long FAR* AllowedEffects)

See Also SftMask Events | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.