How to programmatically cut/copy/get files to/from the Windows clipboard in a system standard compliant form?

后端 未结 3 1382
渐次进展
渐次进展 2020-12-17 04:37
  1. How do I put a cut/copy reference to specific files and/or folders into the Windows clipboard so that when I open standard Windows Explorer window, go to somewhere

3条回答
  •  既然无缘
    2020-12-17 05:14

    If you're using Windows Forms, look at System.Windows.Forms.Clipboard. I think that should be able to do that. I'm not sure how to do what you want since I've never looked in to it, but I'd look at the FileDropList methods (GetFileDropList, etc.) first since they look promising.

    If you need to find out if it was a copy or a cut and similar more detailed information, it seems like you'll have to use the IDataObject interface.

提交回复
热议问题