unit Unit1;

interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
ListBox1: TListBox;
procedure FormCreate(Sender: TObject); protected
procedure WMDROPFILES (var Msg: TMessage); message WM_DROPFILES;

private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation
uses shellapi;

{$R *.DFM}

procedure TForm1.WMDROPFILES (var Msg: TMessage);
var i,anzahl, size : integer;
Dateiname : PChar;

begin
inherited;
anzahl := DragQueryFile(Msg.WParam, $FFFFFFFF,Dateiname,255);
for i := 0 to (anzahl - 1) do
begin
size := DragQueryFile(Msg.WParam, i , nil, 0) + 1;
Dateiname:= StrAlloc(size);
DragQueryFile(Msg.WParam,i , Dateiname, size);
listbox1.items.add(StrPas(Dateiname)); StrDispose(Dateiname);
end;
DragFinish(Msg.WParam);
end;



procedure TForm1.FormCreate(Sender: TObject);
begin
DragAcceptFiles(Form1.Handle, true);
end;

end.

9 Responses so far.

  1. Anonymous says:

    Firstly, you need to choose your preferred layout and then you
    can proceed with customizing the template as much as you want.

    Most of the horror stories you have heard about dating occur when daters rush the process.
    Students will pick an issue within their community.


    Also visit my site courses of photography

Post a Comment

Thank you for your comment.

Any request and idea are welcome.

CLICK TO REGISTER