ShellBrowser Delphi Components Documentation
ContentsIndexHome
Example 2

This example illustrates custom handling of items that are not automatically handled by the shell.

procedure TMainForm.ShellListShellDragOver(sender, DropTarget: TObject;
  DroppedFiles: TStrings; KeyState, X, Y: Integer; var CopyMode: TJamDropEffect);
begin
  //allow single pdf files to be dragged over existing pdf files.
  if (CopyMode = deNone) then begin
    if (DropTarget is TJamShellListItem) and (Uppercase(ExtractFileExt(TJamShellListItem(DropTarget).FullPath)) = '.PDF')
      and (DroppedFiles.Count = 1) and (Uppercase(ExtractFileExt(DroppedFiles[0])) = '.PDF')
    then
      CopyMode := deCopy;
  end;
end;