DragDrop.DoDragDrop
can do this as long as you pass it an appropriate DataObject
.
First copy the files somewhere. You can use System.IO.Path.GetTempPath()
if you don't have anywhere better.
Next create a string array containing the full paths to the files and do the following:
string[] paths = ...;
DragDrop.DoDragDrop(this, new DataObject(DataFormats.FileDrop, paths),
DragDropEffects.Copy);
It is actually possible to do this without pre-copying the files but that gets into some complicated IDataObject interactions, so unless your files are potentially very large and aren't already in the filesystem I would try this method first.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…