Drag and Drop from a Form on Windows; get destination

I am developing an application in VB.NET that requires that a control object (e.g. ListViewItem) be pulled out of a form and at a user-specified location (e.g., on the desktop or in a folder).

However, the file that should be "copied" as the "ListViewItem" represents does not yet exist. It must be downloaded and then placed at a location specified by the user. Can I get the path / location from the destination? Then I will go on to download the file, and then place it where indicated.

I examined other issues regarding a similar problem , which describes the drag-and-drop operation outside the form in detail, there simply is no way to determine where this short segment went or how to specify the destination.

Essentially, I think this might require some kind of โ€œdynamic linkโ€ or โ€œvirtual file,โ€ as I mentioned elsewhere. Then, after the drop operation, somehow gaining access to this โ€œlinkโ€ from my application, proceed to download the file and place it at the final destination.

Any help is appreciated, thanks in advance!


RESULT:

Roger Lipscomb has provided a link containing links to other articles so that looks promising information. The following links may be useful in implementing the drag and drop operation without providing the exact data that is required in managed code.

+3
source share
3 answers

Are you sure you want to know where the "file" was deleted? Or do you just not want to provide data ahead?

, . David Anson .

+2

IDataObject:: GetData CFSTR_FILEDESCRIPTOR, , CFSTR_PREFERREDDROPEFFECT IDataObject:: GetData. . http://hg.mozilla.org/mozilla-central/file/b49a6a8a4973/widget/src/windows/nsDataObj.cpp . , , .

  • CF_HDROP

  • CFSTR_FILEDESCRIPTOR/CFSTR_FILECONTENTS

  • CFSTR_FILENAME

CF_HDROP, , - . CFSTR_FILEDESCRIPTOR/CFSTR_FILECONTENTS.

+4

, DnD . !

. .

, DnD, , (, ).

+2

Source: https://habr.com/ru/post/1732745/


All Articles