event DropQueryEffect (Folder as ExShellFolder, KeyState as Long, ByRef Effect as Long)
Fired while the user is dragging a folder.

TypeDescription
Folder as ExShellFolder A Folder object being droped.
KeyState as Long A long integer that represents the current state of certain keys on the keyboard.
Effect as Long (By Reference) A long integer that represents the desired drag-and-drop effect.
Fires while a drag-and-drop operation is in progress. This event fires just prior to the end of a drag-and-drop operation (i.e., just before the DropFiles event). The Folder parameter is the target of the drag-and-drop operation. The KeyState holds the state of keys (such as Shift, Ctrl, Alt, etc.) at the end of the operation. Effect holds the desired effect on the files in the operation. The AllowDropFiles property determines whether or not the control will accept files dragged-and-dropped from another application (such as Explorer).

Syntax for DropQueryEffect event, /NET version, on:

private void DropQueryEffect(object sender,exontrol.EXFOLDERVIEWLib.ExShellFolder Folder,int KeyState,ref int Effect)
{
}

Private Sub DropQueryEffect(ByVal sender As System.Object,ByVal Folder As exontrol.EXFOLDERVIEWLib.ExShellFolder,ByVal KeyState As Integer,ByRef Effect As Integer) Handles DropQueryEffect
End Sub

Syntax for DropQueryEffect event, /COM version, on:

private void DropQueryEffect(object sender, AxEXFOLDERVIEWLib._IExFolderViewEvents_DropQueryEffectEvent e)
{
}

void OnDropQueryEffect(LPDISPATCH Folder,long KeyState,long FAR* Effect)
{
}

void __fastcall DropQueryEffect(TObject *Sender,Exfolderviewlib_tlb::IExShellFolder *Folder,long KeyState,long * Effect)
{
}

procedure DropQueryEffect(ASender: TObject; Folder : IExShellFolder;KeyState : Integer;var Effect : Integer);
begin
end;

procedure DropQueryEffect(sender: System.Object; e: AxEXFOLDERVIEWLib._IExFolderViewEvents_DropQueryEffectEvent);
begin
end;

begin event DropQueryEffect(oleobject Folder,long KeyState,long Effect)
end event DropQueryEffect

Private Sub DropQueryEffect(ByVal sender As System.Object, ByVal e As AxEXFOLDERVIEWLib._IExFolderViewEvents_DropQueryEffectEvent) Handles DropQueryEffect
End Sub

Private Sub DropQueryEffect(ByVal Folder As EXFOLDERVIEWLibCtl.IExShellFolder,ByVal KeyState As Long,Effect As Long)
End Sub

Private Sub DropQueryEffect(ByVal Folder As Object,ByVal KeyState As Long,Effect As Long)
End Sub

LPARAMETERS Folder,KeyState,Effect

PROCEDURE OnDropQueryEffect(oExFolderView,Folder,KeyState,Effect)
RETURN

Syntax for DropQueryEffect event, /COM version (others), on:

<SCRIPT EVENT="DropQueryEffect(Folder,KeyState,Effect)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function DropQueryEffect(Folder,KeyState,Effect)
End Function
</SCRIPT>

Procedure OnComDropQueryEffect Variant llFolder Integer llKeyState Integer llEffect
	Forward Send OnComDropQueryEffect llFolder llKeyState llEffect
End_Procedure

METHOD OCX_DropQueryEffect(Folder,KeyState,Effect) CLASS MainDialog
RETURN NIL

void onEvent_DropQueryEffect(COM _Folder,int _KeyState,COMVariant /*long*/ _Effect)
{
}

function DropQueryEffect as v (Folder as OLE::Exontrol.FolderView.1::IExShellFolder,KeyState as N,Effect as N)
end function

function nativeObject_DropQueryEffect(Folder,KeyState,Effect)
return

Here is a VB sample that shows you how to cancel a drag-and-drop operation if the target is the "My Computer" folder. In all other cases (targets), the operation is changed to "copy".

Private Sub ExFolderView1_DropQueryEffect(ByVal ExShellFolder As EXFOLDERVIEWLibCtl.IExShellFolder, ByVal KeyState As Long, Effect As Long)
   If ( Folder.DisplayName = "My Computer" )
      Effect = 0 ' cancel
   Else
      Effect = 1 ' copy
   End If
End Sub