打开文件选择对话框与设置默认路径
程序员文章站
2022-03-31 11:14:29
OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); ......
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
DialogResult dr = openFileDialog.ShowDialog();
打开一个文件选择对话框,默认路径为桌面。