473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 6208
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Clyde | last post by:
I am trying to implement the user feedback provided by Windows Explorer when draggng a filename from one place to another. I have the drag and drop action worked out but have had no luck in...
4
by: Dave | last post by:
I need to add the ability to drag from a Windows Form and drop into a non dotNet application. For example, having a generated image in my app that I wish to drag out into explorer as a friendly way...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
3
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== ...
0
by: Yavuz Bogazci | last post by:
Hi, i have build a form with a listbox and the function that he user can drag and drop files from the windows explorer in this listbox. this works for me when i start it on my localmachine. ...
1
by: Robin Tucker | last post by:
Apologies for the ambiguous title, you will be expecting me to be asking how to perform drag and drop from my application into another application. Well, kind-of. I've got drag and drop sorted,...
2
by: Dolorous Edd | last post by:
Hi, for a program I'm working on I need to be able to drag multiple files between Windows Explorer and a ListBox, in both directions. Implementing the "drag in" was pretty easy, but I can't find...
5
by: Brian Henry | last post by:
I haven't worked much with drag/drop but I am trying to make a form that accepts files to drug onto it from explorer and droped and have the form know the full path and file name of the files...
1
by: Terry Olsen | last post by:
My first time using TreeViews. I have TreeView1 set up to display my directory structure just like Windows Explorer. I can drag & drop files and folders over to TreeView2. I can re-arrange the...
4
by: SStory | last post by:
I want to drag a message from Outlook to a richtextbox on a vb.net form. I don't get the message body. I have searched all over the place and found nothing. Does anyone know how to do this? I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.