Notification of drop in drag-drop in Windows

Question!

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.



Answers

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.

By : Nick


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

By : Stu


I wanna say "Are you serious?" but I can kinda see your point...

I probably would not do this though, but rather actually wave the code in their face and ask for actual answers and get them to engage their brain... Maybe even plant one to get their attention there and then, maybe they will then feel more compelled to review it properly after check in...

I wouldn't like to check in bugs on purpose, just out of fear of me losing track of where the bug is ^_^



This video can help you solving your question :)
By: admin