views:

348

answers:

3

My C# program has a list of files that can be dragged from it and dropped into another program. My requirements are that the file be copied to a different directory first.

So, can I be notified of the drop operation so that I can only copy the file if operation succeeds? I'd rather wait till I know it needs to be copied before actually performing the copy.

Also, is it possible to know what program the drop operation is occurring in? Ideally I'd like to alter the filepath based on who or what its being dropped.

The solution to this can be in any .NET language or C/C++ with COM.

+1  A: 

There are a few ambiguities in your question. What operation needs to be successful?

For everything you want to know about drag and drop, browse through these search results (multiple pages worth):

Raymond Chen on drag and drop

Stu
A: 

So, you intend to modify the data being dropped based on the drop target? I don't think this is possible; after all, you populate the data when the drag is initiated.

Nick
A: 

@Stu I meant that the user finishes the drop rather than cancelling.

Joel Lucsy