I'm making an app that has some functional开发者_Go百科ity of windows explorer. Actually I have to make a copy/paste actions. My question is what does windows copy to clipboard, when I'm right-clicking the file and the choose 'Copy'?
Here's my Paste code:
var files = (string[])Clipboard.GetDataObject().GetData("FileName");
FileInfo info = new FileInfo(item);
info.CopyTo(Path.Combine(currentFolder, info.Name));
There are many formats present on the clipboard as a result of the copy. In XP, I get this:
* DataObject
* Shell IDList Array
* HDROP
* Preferred DropEffect
Shell Object Offsets
FileName
FileNameW
* Ole Private Data
The ones with * were read by Explorer when I pasted.
精彩评论