unit dragf; (* dragf - example to show how to accept filenames form other application. This form accepts dragging from other program cabable to drag filenames (f.ex Explorer). The names are just shown in a listbox. In real application replace ListBox.Items.Add(name) by something real, like opening the file. Used component kDragTarget.pas Vesa Lappalainen 28.7.1999 *) interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, kdragtarget; type TFormDrag = class(TForm) ListBoxNames: TListBox; ButtonClear: TButton; DragTarget1: TkDragTarget; procedure ButtonClearClick(Sender: TObject); procedure DragTarget1Drop(Sender: TkDragTarget; pt: TPoint); private public end; var FormDrag: TFormDrag; implementation {$R *.DFM} procedure TFormDrag.ButtonClearClick(Sender: TObject); begin ListBoxNames.Clear; end; procedure TFormDrag.DragTarget1Drop(Sender: TkDragTarget; pt: TPoint); begin Sender.AddTo(ListBoxNames.Items); end; end.