HeaderPane
Main
Hide
Share Link
Print

Files Property, DataObject Object

Returns a collection of filenames used by the sftCFFiles format.

Syntax

Get

C#DataObjectFiles Files = object.Files;
VB.NETFiles = object.Files As DataObjectFiles
C++IVDMDataObjectFiles* Files = object->Files;
IVDMDataObjectFiles* Files = object->GetFiles();
CHRESULT object->get_Files(struct IVDMDataObjectFiles** Files);

object

A DataObject object.

Files

Returns a collection of filenames used by the sftCFFiles format.

Comments

The Files property returns a collection of filenames used by the sftCFFiles format.

The Files collection is filled with file names only when the DataObject object contains data of type sftCFFiles. The DataObject object can contain several different types of data. You can iterate through the Item property to retrieve the list of file names.

The Files collection can be filled to allow an application to act as a drag source for a list of files (similar to Windows Explorer).

Examples

C# View entire sample code

    axSftMask1.MaxLength = 300;
    axSftMask1.PromptUnderline = false;
    axSftMask1.OLEDropMode = SftMaskOLEDropModeConstants.OLEDropSftMaskManual;
}

private void axSftMask1_OLEDragDrop(object sender, AxSftMaskLib80._ISftMaskEvents_OLEDragDropEvent e)
{
    if (e.data.GetFormat((short) SftOLEClipboardConstants.sftCFFiles)) {
        if (e.data.Files.Count > 1)
            MessageBox.Show("Only one file at a time please.");
        else
            axSftMask1.Text = e.data.Files[1];
    }
}

private void axSftMask1_OLEDragOver(object sender, AxSftMaskLib80._ISftMaskEvents_OLEDragOverEvent e)

VB.NET View entire sample code

    AxSftMask1.Mask = ""
    AxSftMask1.MaxLength = 300
    AxSftMask1.PromptUnderline = False
    AxSftMask1.OLEDropMode = SftMaskOLEDropModeConstants.OLEDropSftMaskManual
End Sub

Private Sub AxAxSftMask1_OLEDragDrop(ByVal sender As Object, ByVal e As AxSftMaskLib80._ISftMaskEvents_OLEDragDropEvent) Handles AxSftMask1.OLEDragDrop
    If e.data.GetFormat(SftOLEClipboardConstants.sftCFFiles) Then
        If e.data.Files.Count > 1 Then
            MsgBox("Only one file at a time please.")
        Else
            AxSftMask1.Text = e.data.Files.Item(1)
        End If
    End If
End Sub

C++ View entire sample code

    return TRUE;
}

void CProject1Dlg::OnOLEDragDropSftMask1(LPDISPATCH FAR* Data, long FAR* TargetChar, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y)
{
    IVDMDataObjectPtr pData = *Data;

    if (pData->GetFormat(sftCFFiles) != VARIANT_FALSE) {
        if (pData->Files->Count > 1)
            AfxMessageBox(_T("Only one file at a time please."), MB_OK, 0);
        else
            m_pMask1->Text = pData->Files->GetItem(1);
    }
}

void CProject1Dlg::OnOLEDragOverSftMask1(LPDISPATCH FAR* Data, long FAR* TargetChar, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y, long FAR* State)

See Also DataObject Object | Object Hierarchy


Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.