Implementing drag-drop from Chrome on my .NET Windows form

前端 未结 3 894
难免孤独
难免孤独 2020-12-14 03:40

Google Chrome has a handy feature where I can click a download link and drag it into a Windows Explorer window, and then drop. After dropping, Chrome then downloads the fil

3条回答
  •  爱一瞬间的悲伤
    2020-12-14 04:18

    Strangely, I only get shortcuts when dragging files from Chrome.

    Anyway, in case Chrome does the drag & drop with virtual sources, that is, it downloads the file and generates the content on drag & drop completion, you have to implement shell interface IDropTarget. I get the feeling the file contents might be transferred via IStream which is not supported by .NET Drag&Drop.

    Maybe this http://msdn.microsoft.com/en-us/library/bb776904%28VS.85%29.aspx#copying and this Drag and drop virtual files using IStream should get you on the right path.

提交回复
热议问题