private void Form1_Load(object sender, EventArgs e)
{
listView1.GridLines = true;//在各数据之间形成网格线
listView1.View = View.Details;//显示列名称
listView1.FullRowSelect = true;//在单击某项时,对其进行选中
listView1.HeaderStyle = ColumnHeaderStyle.Nonclickable;//隐藏列标题
listView1.Columns.Add("文件路径", listView1.Width - 5, HorizontalAlignment.Right);
}

private void listView1_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Copy; //设置拖放操作中目标放置类型为复制
String[] str_Drop = (String[])e.Data.GetData(DataFormats.FileDrop, true);//检索数据格式相关联的数据
Data_List(listView1, str_Drop);
}

public void Data_List(ListView LV, string[] F) //Form或MouseEventArgs添加命名空间using System.Windows.Forms;
{
for (int i = 0; i < F.Length; i++)
{
ListViewItem item = new ListViewItem(F[i]);
LV.Items.Add(item);
}
}

1.listView1_DragEnter函数为拖动的事件

2.Data_List为显示数据到列表中