哈哈 我知道
private void FormMain_DragDrop(object sender, DragEventArgs e)
{
labelX1.Text=((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
}
private void FormMain_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
}
else
e.Effect = DragDropEffects.None;
}
这是代码