property Edit.OLEDropMode as exOLEDropModeEnum
Returns or sets how a target component handles drop operations

TypeDescription
exOLEDropModeEnum An exOLEDropModeEnum expression that indicates the OLE Drag and Drop mode. 
The ExEdit control supports manual or automatic OLE Drag and Drop operation. The control fires the OLEStartDrag when the user starts OLE drag and drop operation.

The following VB sample puts the selected text to the clipboard when the drag and drop operation starts ( The OLEDropMode property is exOLEDropAutomatic ):

With Edit1
    .OLEDropMode = exOLEDropManual
End With
Private Sub Edit1_OLEStartDrag(ByVal Data As EXEDITLibCtl.IExDataObject, AllowedEffects As Long)
    Dim s As String
    s = Edit1.SelText
    If (Len(s) > 0) Then
        AllowedEffects = 1
        Data.SetData s, 1
    End If
End Sub

The following C++ sample puts the selected text to the clipboard when the drag and drop operation starts:

m_edit.SetOLEDropMode( 1 );
void OnOLEStartDragEdit1(LPDISPATCH Data, long FAR* AllowedEffects) 
{
	CString s( m_edit.GetSelText() );
	if ( s.GetLength() > 0 )
	{
		*AllowedEffects = 1; /*exOLEDropEffectCopy*/
		if ( EXEDITLib::IExDataObjectPtr spData( Data ) )
			spData->SetData( COleVariant( s ), COleVariant( long(EXEDITLib::exCFText) ) );
		
	}
}

The C++ sample uses the #import <exedit.dll> statement to include definitions for the IExDataObject and IExDataObjectFiles objects.

The following VB.NET sample puts the selected text to the clipboard when the drag and drop operation starts:

With AxEdit1
    .OLEDropMode = EXEDITLib.exOLEDropModeEnum.exOLEDropManual
End With
Private Sub AxEdit1_OLEStartDrag(ByVal sender As Object, ByVal e As AxEXEDITLib._IEditEvents_OLEStartDragEvent) Handles AxEdit1.OLEStartDrag
    Dim s As String = AxEdit1.SelText
    If (Len(s) > 0) Then
        e.allowedEffects = 1
        e.data.SetData(s, 1)
    End If
End Sub

The following C# sample puts the selected text to the clipboard when the drag and drop operation starts:

axEdit1.OLEDropMode = EXEDITLib.exOLEDropModeEnum.exOLEDropManual;
private void axEdit1_OLEStartDrag(object sender, AxEXEDITLib._IEditEvents_OLEStartDragEvent e)
{
	string s = axEdit1.SelText;
	if (s.Length > 0)
	{
		e.allowedEffects = 1;
		e.data.SetData(s, EXEDITLib.exClipboardFormatEnum.exCFText );
	}
}

The following VFP sample puts the selected text to the clipboard when the drag and drop operation starts:

with thisform.Edit1
	.OLEDropMode = 1
endwith
*** ActiveX Control Event ***
LPARAMETERS data, allowedeffects

with thisform.Edit1
	local s
	s = .SelText
	if ( len(s) > 0 ) then 
		allowedeffects = 1
		data.SetData( s, 1 )
	endif
endwith