ShellBrowser Delphi Components Documentation
ContentsIndexHome
Example 1

In the following examples dragged items will be copied by default unless dragging is executed with the right mouse button or Shift is pressed at the same time.

procedure TMainForm.ShellListShellDragOver(sender, DropTarget: TObject;
  DroppedFiles: TStrings; KeyState, X, Y: Integer; var CopyMode: TJamDropEffect);
begin
  if CopyMode = deNone then
    exit; //do not change the drop action for items that cannot be handled by the shell.

  if (KeyState and MK_LBUTTON = MK_LBUTTON) then begin //only handle left button actions
    if (KeyState and MK_SHIFT = MK_SHIFT) then //if Shift is pressed move the dragged objects
      CopyMode := deMove
    else
      CopyMode := deCopy; //if shift isn't pressed, always copy, disregarding if it's on the same drive or if other keys are pressed.
  end
  else
   CopyMode := deDefault; //if the right button is pressed, let user decide which action to take
end;