例如向MSN中间的,把要传送的文件直接拖进去,请问在DELPHI中怎么才能办到?
先谢谢各位大哥了!

解决方案 »

  1.   

    好像我说的不太清楚,我想做一个播放器,想向DVD一样可以直接把文件拖进去放,但是现在不知道怎么才能达到那个效果。不知道说得明白否。
      

  2.   

    uses ShellApi;
    ...
      private
        { Private declarations }
        procedure DropFiles(var Msg: TMessage); message WM_DROPFILES;
      ... 
    implementation
    ...
    procedure TForm1.DropFiles(var Msg: TMessage);
    var
      fName: array[0..254] of char;
    begin
      DragQueryFile(THandle(Msg.WParam), 0, fName, 250);
      Edit1.Text := fName;  {这里得到文件名,想怎么做就随你了}
      DragFinish(Msg.WParam);
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      DragAcceptFiles(self.Handle, true);
      ...
    end;