By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Create file using drag and drop

P: n/a
I'm trying to create a file using drag and drop.
I want to be able to select a listview item drag it to the shell and create a file.
Each icon in the listview represents a blob in a database.
When I drop onto the shell I want a file created with a specified name containing the data from the database.

I've looked at the FileDrop format but it look to have only the filename and not the data.

TIA
Jan 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Darren,
Welcome to MSDN Newsgroup!

Based on your requirement, I suggest you could use OLE Drag and Drop com
technique to achieve the goal.
The Source of the drag-drop is represented by the IDropSource interface.
The IDropSource contains methods for generating visual feedback, and for
canceling or completing the drag-drop operation. The Target of the
drag-drop is represented by the IDropTarget interface. The Data being
transferred is represented by the IDataObject interface.
So you could take out data form database and use IDropSource interface to
transfer it. And then create a new file with the data from IDropSource. You
could refer to the following article to get more information about OLE
Drag/Drop:
Part 1 - Introduction OLE Drag and Drop Introducing the OLE and COM
technologies.
http://www.catch22.net/tuts/dragdrop.asp

Part 2 - OLE Data Transfers All about OLE data types, storage mediums and
data formats.
http://www.catch22.net/tuts/dragdrop2.asp

Part 3 - Implementing IDataObject Standalone implementation of the
IDataObject interface.
http://www.catch22.net/tuts/dragdrop3.asp

Part 4 - Enumerating FORMATETC Standalone implementation of the
IEnumFormatEtc interface.
http://www.catch22.net/tuts/dragdrop4.asp

Part 5 - Drop Source Implementing the IDropSource interface.
http://www.catch22.net/tuts/dragdrop5.asp

Part 6 - Drop Target Implementing the IDropTarget interface.
http://www.catch22.net/tuts/dragdrop6.asp

I hope the above information is helpful for you. If you have any questions,
please feel free to let me know. Thanks and have a nice day!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
Jan 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.