C#实现【选择文件夹的保存路径】
private static string OpenFolderAndSelectFile()
{
string FolderPath = null;
FolderBrowserDialog FbDialog = new FolderBrowserDialog();
DialogResult result = FbDialog.ShowDialog();
if (result == DialogResult.OK)
{
FolderPath = FbDialog.SelectedPath;
}
return FolderPath;
}
C#实现【选择mdb文件的保存路径】
public static string WsPath()
{
string WsFileName = "";
OpenFileDialog OpenFile = new OpenFileDialog();
OpenFile.Filter = "个人数据库(MDB)|*.mdb";
DialogResult DialogR = OpenFile.ShowDialog();
if (DialogR == DialogResult.Cancel)
{
}
else
{
WsFileName = OpenFile.FileName;
}
return WsFileName;
}