保存文件
1
FolderBrowserDialog foldFile = new FolderBrowserDialog();
2
if (foldFile.ShowDialog() == DialogResult.OK)
3
{
4
txtFileName.Text = openFile.SelectedPath;
5
}
打开指点的文件
FolderBrowserDialog foldFile = new FolderBrowserDialog();2
if (foldFile.ShowDialog() == DialogResult.OK)3
{4
txtFileName.Text = openFile.SelectedPath;5
}1
OpenFileDialog openFile = new OpenFileDialog();
2
string fileName = string.Empty;
3
openFile.Filter = "*.dat|*.dat";
4
if (openFile.ShowDialog() == DialogResult.OK)
5
{
6
txtDownloadFile.Text = openFile.FileName;
7
(string.Empty);
8
}
OpenFileDialog openFile = new OpenFileDialog();2
string fileName = string.Empty;3
openFile.Filter = "*.dat|*.dat";4
if (openFile.ShowDialog() == DialogResult.OK)5
{6
txtDownloadFile.Text = openFile.FileName;7
(string.Empty);8
}

浙公网安备 33010602011771号