property HTML.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 ExHTML 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 HTML1
    .OLEDropMode = exOLEDropManual
End With
Private Sub HTML1_OLEStartDrag(ByVal Data As EXHTMLLibCtl.IExDataObject, AllowedEffects As Long)
    Dim s As String
    s = HTML1.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_html.SetOLEDropMode( 1 );
void OnOLEStartDragHTML1(LPDISPATCH Data, long FAR* AllowedEffects) 
{
	CString s( m_html.GetSelText() );
	if ( s.GetLength() > 0 )
	{
		*AllowedEffects = 1; /*exOLEDropEffectCopy*/
		if ( EXHTMLLib::IExDataObjectPtr spData( Data ) )
			spData->SetData( COleVariant( s ), COleVariant( long(EXHTMLLib::exCFText) ) );
		
	}
}

The C++ sample uses the #import <exhtml.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 AxHTML1
    .OLEDropMode = EXHTMLLib.exOLEDropModeEnum.exOLEDropManual
End With
Private Sub AxHTML1_OLEStartDrag(ByVal sender As Object, ByVal e As AxEXHTMLLib._IHTMLEvents_OLEStartDragEvent) Handles AxHTML1.OLEStartDrag
    Dim s As String = AxHTML1.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:

axHTML1.OLEDropMode = EXHTMLLib.exOLEDropModeEnum.exOLEDropManual;
private void axHTML1_OLEStartDrag(object sender, AxEXHTMLLib._IHTMLEvents_OLEStartDragEvent e)
{
	string s = axHTML1.SelText;
	if (s.Length > 0)
	{
		e.allowedEffects = 1;
		e.data.SetData(s, EXHTMLLib.exClipboardFormatEnum.exCFText );
	}
}

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

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

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