473,543 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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. "FileGroupDescr iptor", "FileConten ts", 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 6216
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)

"BradBrigad e" <si********@hot mail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.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. "FileGroupDescr iptor", "FileConten ts", 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
4943
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 finding how to capture the piece of the screen into a bitmap to simulate the movement. I know this could be done with the Windows API but can't find any...
4
3036
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 to save it. I have tried creating the object that I place into the DoDragDrop() by inheriting the COM interfaces IDropSource and IDataObject...
2
4304
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 there? What about Drag/Drop; is there more than one way for the source to make data available Is it always OLE?
3
10393
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== using System; using System.Drawing; using System.Collections; using System.ComponentModel;
0
2856
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. But when i put my Apps .exe file on my WebServers WWWROOT directory and call it from the internet explorer. the application starts with the...
1
1922
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, apart from one thing. I'm dragging and dropping items from my treeview and listview which represent database "Images" (blobs). Now, I don't store the...
2
3109
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 a way to export more than on item at time. The ideal result would be to be able to drag the selected files, but as soon as I click on the LB to...
5
10143
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 dropped onto it.. does anyone have any examples of this? thanks
1
2296
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 structure in TreeView2 (putting files in different folders and such...like you do when you create a structure for burning a CD). I have two...
4
14572
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 don't care about attachments. I just need the text. Thanks, Shane
0
7349
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7347
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5885
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5271
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3391
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
636
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.