Drag 'virtual' file to windows explorer

Davux

New member
Joined
Nov 12, 2006
Messages
1
Programming Experience
5-10
What I'm trying to do is what most FTP clients can do. You can drag files/folders out of the listview, but they are then downloaded and copied to the target location.
The problem is that in order to pass the string array to the DataObject, I need the files to exist in a temp location on the disk, so they need to be downloaded first, thus locking up the application.

I'm using fileDrop as my DataFormat for the Dataobject that is exported, but I'm unable to find a way to either get the callback location (where the files were 'placed' on drop in windows explorer), nor how to (alternately) how to halt the operation until the files exist.

How can this be accomplished? I'm using VS/2005 and .NET 2.0, any help would be great.

Thanks!
 
I've seen some C++ code that use COleDataSource and DelayRenderData, for example Code Project "How to drag a virtual file from your app into Windows Explorer", but not so far a managed translation.

Anyway, you could always cheat :) First create a temporary empty file with IO.Path.GetTempFileName function, send this with the dodragdrop(filedrop), search it up to find the drop folder (and remove the temp file), then you can download the files to this folder.
 
Back
Top