Drag Drop data into Windows Explorer

B

BradBrigade

I want to drag an object from my application into Windows Explorer and
have it create a new file, but the object I want to drop is not a file
to begin with. It seems the only thing I can do is create a temporary
file, then call DoDragDrop with the temp file's name, then delete the
temp file after. The problem is that it is a big process to create the
file, and I don't want to do that until the drop has been done and
explorer requests the file.

I know it can be done because Outlook does it with email messages, and
checking the DataObject's DataFormats reveals that it is not dragging a
pre-existing file. But, it has a bunch of crap that I have no idea
about. "FileGroupDescriptor", "FileContents", etc... and I can't find
out how to use these things in a C# app. It seems they are only use in
C++.

I've been searching for the better half of a day and am getting
nowhere. Can I have it drag a stream and a file name and have explorer
build the file from that? What can I do? Can someone point me
somewhere where I might get some help for this?

Thanks a lot,
-Brad
 
S

Stoitcho Goutsev \(100\)

BradBrigade,

I don't want to disappoint you, but I have been looking at this 2 years ago
and I came to the conclusion that this is not possible with .NET. I don't
remember the details, but just to know there is a big chances that this may
not be possible at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top