0
Answer

ListView drag and drop to Windows Explorer

Photo of pdejan

pdejan

21y
2.5k
1
I want to drag files from myAPP and drop to Windows Explorer... OK nice here is code "file copy" is done but anyone have idea why Windows Explorer don't refresh after drop? private void lvw_ItemDrag(object sender,ItemDragEventArgs e) { int SelectedCount=0; string[] files = new String[lvw.SelectedItems.Count]; foreach(ListViewItem lvi in lvw.SelectedItems) { files[SelectedCount] = Address.Text + "\\" + lvi.Text; SelectedCount++; } DataObject data = new DataObject(DataFormats.FileDrop, files); data.SetData(DataFormats.StringFormat, files); DoDragDrop(data, DragDropEffects.Copy); } Many thanks M8s