Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

DragDrop1 Sample (VB.NET)

This sample illustrates using an OLE drag source.

This is not an executable sample, so a complete project is not provided. These statements are intended to show basic concepts and the syntax used.

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 AxAxSftMask1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEStartDragEvent) Handles AxSftMask1.OLEStartDrag
    e.data.Clear()
    e.data.Files.Add(AxSftMask1.SelText)
    e.data.SetData(Nothing, SftOLEClipboardConstants.sftCFFiles)
    e.allowedEffects = 1 ' vbDropEffectCopy
End Sub

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