private void Form1_DragDrop(object sender, DragEventArgs e)
{
string path = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
MessageBox.Show(path);
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
private void Form1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.Link;
else e.Effect = DragDropEffects.None;
}
-----
posted on
2008-11-04 12:47
BoneKing
阅读(
589)
评论()
编辑
收藏
举报