procedure TDragFileForm.WMDropFiles(var Message: TMessage);
var
  index, iCount: integer;
  FileName: array [0..255] of char;
begin
  index := -1;
  iCount := DragQueryFile(Message.WParam, index, FileName, 255);
  for index := 0 to iCount - 1 do
  begin
    DragQueryFile(Message.WParam, index, FileName, 255);
    ShowMessage(FileName);
  end;
  DragFinish(Message.WParam);
end;