views:

66

answers:

1

I'm using the following code to drag&drop data from listbox into other applications:

Dim data As New DataObject(DataFormats.UnicodeText, ListBox1.Text) ListBox1.DoDragDrop(data, DragDropEffects.Copy Or DragDropEffects.Copy)

How can I get a handle of the window that receives the data?

I'm looking to build something like "Finder Tool" in Microsoft Spy++.

+1  A: 

I don't think that you can know in which window the drop occurred. This is not the philosophy of drag&drop.

Are you thinking of the 'target icon' that Spy++ shows when you can find a window by moving over the desktop ?

This is not a drag&drop operation, I guess Spy++ sets the current window cursor to the 'target', captures the mouse, and uses the hit testing Windows API to ask what is under the cursor.

Timores