Drag Files From ListView

▼魔方 西西 提交于 2021-02-19 05:39:07

问题


It seemed farily straight forward learning how to process files dropped onto a ListView control. But I can't seem to find anything about dragging files FROM the ListView control.

To complicate things, the ListView control is displaying an FTP directory. So I don't want to actually download the files until I confirm they have been dropped on a window that will accept them.

I know that it's possible to provide the actual data for a drag-and-drop operation only after the drop has taken place. But I'm having trouble finding anything about doing this from a ListView control using C# and Webforms.

Any tips?

Thanks!


回答1:


The best link I've found on this issue yet is at Delay's Blog.

He starts by saying "This code [...] and is specifically targeted at scenarios where an application wants to allow the user to drag an element to a folder and create a file (or files) dynamically on the drop/paste. The standard .NET APIs for drag-and-drop don't support this scenario [...]"

Wow, that's the answer. For all the problems I have with C# and .NET, I run into yet another obstacle. He does have some code to workaround this. I'll be checking that out.



来源:https://stackoverflow.com/questions/4294882/drag-files-from-listview

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!