CommonOpenFileDialog dialog = new CommonOpenFileDialog();
RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"Directory\Background\shellex\ContextMenuHandlers\New", true);
//Set it to blank.
key.SetValue("", "");
dialog.IsFolderPicker = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)发布于 2019-12-26 20:52:02
CommonOpenFileDialog不支持该操作。
您可以使用自定义类来执行此操作
查看这篇文章:
https://www.codeproject.com/Articles/19566/Extend-OpenFileDialog-and-SaveFileDialog-the-Easy
https://stackoverflow.com/questions/59488121
复制相似问题