![]() | Type | Description | ||
| 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 | A long integer that represents the desired drag-and-drop effect. |
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