Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.


Project: Drop Files Components.

Unit: PJDropFiles.

Applies to: ~>5.0

This non-visual component catches all WM_DROPFILES messages that are received by a control referenced by the ManagedControl property. The component therefore intercepts files dragged from Windows Explorer and dropped on the managed control.

Use TPJCtrlDropFiles when you want to take different actions depending on which control files are dropped on - you can use a different TPJCtrlDropFiles component for each control that can receive file drops.


TPJCtrlDropFiles defines no new methods.


Only those properties added or modified by TPJCtrlDropFiles are listed here. All other inherited properties are omitted.

Property Description
Count This read-only property returns the number of files dropped on the managed control.
DropControl This read only property references any control parented by the managed control where files are dropped.
DropPoint This read only property gives the mouse coordinates where the files were dropped.
Enabled Determines whether dropped files are handled or ignored.
FileName The name of a file dropped on the managed control.
Files The names of the most recent files dropped on the managed control.
Filter References a file filter component used to filter the names of dropped files.
ForegroundOnDrop Causes the parent form to be brought to the front when files are dropped.
IsFolder Tells whether each of the dropped files is a folder or a file.
ManagedControl References the managed control.
Options Determines how the dropped files are processed and which files are stored in the Files property.
PassThrough Causes drop files messages to be passed through to the owning form.


Event Description
OnBeforeDrop This event occurs just before files dropped on the managed control are processed.
OnDropFiles This event occurs when files are dropped on the managed control.
OnFileFilter This event occurs for each file and folder processed and allows for custom filtering of files.