Drag Drop from .NET application to Explorer -
I am looking to provide the ability to drag and drop files with grids and other controls in my application in Explorer. For any good samples / articles?
It is very straightforward, just call DoDragDrop in a mouse download event. You will need actual files on the disk for this.
Private Zero Form 1_MouseDown (Object Sender, MouseEventArgs E) {string [] files = new string [] {@ "c: \ temp \ Test.txt"}; This.DoDragDrop (New DataObject (DataFormats.FileDrop, Files), DragDropEffects.Copy); }
Comments
Post a Comment