473,893 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

drag drop from app to explorer with delayed file creation

Hi,

I am developping an app using managed C++. I want to be able to do a
drag drop from the app to windows explorer. The files to be dropped
onto explorer do not exist yet, the files are to be created by the app
when the user does the drop into explorer.

I have done some searches and found COleDataSource: :DelaySetData could
be useful but this is MFC and I can't find the equivalent in .NET.

Anyone know the .NET equivalent for DelaySetData or any other way I can
accomplish what I want to do?

Many thanks,
Nick

Jan 17 '07 #1
1 1838
On 17 Jan 2007 07:11:27 -0800, "Nick" <nv*********@ya hoo.comwrote:
>Hi,

I am developping an app using managed C++. I want to be able to do a
drag drop from the app to windows explorer. The files to be dropped
onto explorer do not exist yet, the files are to be created by the app
when the user does the drop into explorer.

I have done some searches and found COleDataSource: :DelaySetData could
be useful but this is MFC and I can't find the equivalent in .NET.

Anyone know the .NET equivalent for DelaySetData or any other way I can
accomplish what I want to do?

Many thanks,
Nick
I think you need to handle CFSTR_FILECONTE NTS as described here:

http://msdn.microsoft.com/library/de...asp?frame=true
http://msdn.microsoft.com/library/de.../clipboard.asp

The .NET object you would use is DataObject, but according to this message
(7/2003), it doesn't support the CFSTR:

http://groups.google.com/group/micro...f6cdf119d9f156

That message essentially recommends reinventing COleDataSource. Maybe
codeproject.com can help you more with this. For example, Nish's article
shows how to do this with COleDataSource:

http://www.codeproject.com/tips/Expl...select=1724080

--
Doug Harrison
Visual C++ MVP
Jan 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1238
by: Lloyd Sheen | last post by:
I am looking for explanation/sample/tutorial to allow the creation of a d/d object that can be dropped on another app and allow that app to see the object dropped as a file list (ala file explorer). I have a listview that has a list of files that have certain attributes (determined when the listview is populated). I would like to be able to select certain listview items and then drag those items to another app. If I use explorer it...
6
2657
by: Colin Young | last post by:
I've got a owner-drawn listview control that displays images and now I'm trying to implement drag and drop so I can drag images from the control and drop them onto other applications. So far if I drop on windows explorer it works (i.e. an image file is created where I dropped the image) or the console displays the full path to the image. Unfortunately it doesn't work with Excel. Nothing at all happens. No error, nothing. The code I am...
5
4992
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 way to do it with .Net functions. Any help is appreciated.
4
3077
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 with no luck. If anyone can help I am very much open to suggestions. Thanks in advance!
0
2871
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 following error message.
1
1941
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 blob in the tree, I fetch it when I need it. This is a problem for drag and drop, because, for...
2
6234
by: BradBrigade | last post by:
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...
2
2099
by: Robert Zahm | last post by:
I have created a C# user control which display certain filesystem information, and allows the user to drag an drop files into and out of the control. I then placed this user form in IE using an <object> tag. Doing this has broken the drag and drop functionality from Windows Explorer into IE (it still works fine going from IE to Windows Explorer). The problem is that whenever I drag a file over IE, IE wants to implement the drop...
16
11876
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality that most Windows programs have, so I'm suprised it's not easier to implement in Access/VBA. Through Google, I found two VB6 examples and one VBA example on the Access Web written by Dev Ashish. The VB6 examples used loops to keep checking...
0
9985
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9832
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10839
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10469
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7173
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5858
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4684
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
2
4280
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.