DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect = DragDropEffects.Link;
else
e.Effect = DragDropEffects.None;
}
private void Form1_DragDrop(object sender, DragEventArgs e)
{
string strPath = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();//获取拖拉文件的路径
if (Path.GetExtension(strPath) == ".sln")//如果是VS解决方案文件
{
this.solutionPath = strPath;
SolutionPathTxt.Text = solutionPath;
this.LoadSolution(solutionPath);
}
}
相关文章:
-
2021-09-22
-
2022-12-23
-
2022-12-23
-
2021-11-09
-
2021-10-01
-
2022-12-23
-
2022-01-14
-
2021-07-11
猜你喜欢
-
2021-11-11
-
2021-09-08
-
2021-06-02
-
2022-12-23
-
2022-12-23
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2022-12-20
-
下载
2023-03-28
-
下载
2023-03-12
-
下载
2022-12-03