OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
DialogResult dr = openFileDialog.ShowDialog();
打开一个文件选择对话框,默认路径为桌面。
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
DialogResult dr = openFileDialog.ShowDialog();
打开一个文件选择对话框,默认路径为桌面。