471,317 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Drag Drop data into Windows Explorer

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

Jan 13 '06 #1
2 6124
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.
--

Stoitcho Goutsev (100)

"BradBrigade" <si********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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

Jan 13 '06 #2
Try looking at all the drag and drop examples here:
http://www.codeproject.com/

You might find one that points you in the right direction.

Dave
Jan 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Clyde | last post: by
2 posts views Thread by SamSpade | last post: by
3 posts views Thread by Ajay Krishnan Thampi | last post: by
reply views Thread by Yavuz Bogazci | last post: by
2 posts views Thread by Dolorous Edd | last post: by
5 posts views Thread by Brian Henry | last post: by
1 post views Thread by Terry Olsen | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.