如果我对此不傻,那么FolderBrowserDialog的设计非常可靠愚蠢。它只允许从几个预定义的 文件夹(Environment.SpecialFolder)进行strat浏览。如果我想从任何我想要的 文件夹开始,我该怎么办?
解决方案Fei Li写道:
如果我对此不傻,那么FolderBrowserDialog的设计非常愚蠢。它只允许strat从几个预定义的文件夹(Environment.SpecialFolder)浏览。如果我想从我想要的任何文件夹开始,我该怎么办?这不是RootFolder属性的含义。 RootFolder属性 只是告诉对话框它应该在哪个shell命名空间中运行, ,如果你想将浏览限制为仅限我的文档。它阻止用户在该特殊文件夹的*之外浏览。 SelectedPath属性,它是一个字符串,可以设置为任何路径 存在于RootFolder特殊文件夹下。这是打开对话框时最初显示的路径 。 - 麦克风
它不会让事情变得更好,因为SelectedPath必须在 下面的RootFolder。为什么不从我想要的任何文件夹中调整strat,例如,我的 应用程序运行文件夹? " Mike Edenfield"写道: Fei Li写道: 如果我不是傻到这,那么设计FolderBrowserDialog非常愚蠢。它只允许strat从几个预定义的文件夹(Environment.SpecialFolder)浏览。如果我想从任何我想要的文件夹开始,我该怎么办?
这不是RootFolder属性的含义。 RootFolder属性只是告诉对话框它应该在哪个shell命名空间中操作,例如,如果你想将浏览限制为仅仅我的文档。它可以防止用户在该特殊文件夹的*之外浏览。 SelectedPath属性是一个字符串,可以设置为RootFolder下面的任何路径特殊文件夹。那是打开对话框时最初出现的路径。 - 麦克
set然后将SelectedPath发送到您的应用程序运行文件夹... Fei Li <铁*** @ discussions.microsoft>在消息中写道 新闻:20 ********************************** @ microsof t ... 它不会让事情变得更好,因为SelectedPath必须在下面的RootFolder。为什么不从我想要的任何文件夹中进行策略,例如,我的应用程序运行文件夹? Mike Edenfield写道: Fei Li写道:>> >如果我对此不傻,那么FolderBrowserDialog的设计是>非常>笨。它只允许从几个预定义的> strat眉毛。文件夹(Environment.SpecialFolder)。如果我想开始,我该怎么办>来自任何>我想要的文件夹?
这不是RootFolder属性的含义。 RootFolder属性只是告诉对话框它应该在哪个shell命名空间中操作,例如,如果你想将浏览限制为仅仅我的文档。它可以防止用户在该特殊文件夹的*之外浏览。 SelectedPath属性是一个字符串,可以设置为RootFolder下面的任何路径特殊文件夹。这是打开对话框时最初出现的路径。 - 麦克
Hi, If I''m not stupid for this, then the design of FolderBrowserDialog is very stupid. It only allow to strat browing from several predefined folder(Environment.SpecialFolder). What can I do if I want to start from any folder I want?
解决方案 Fei Li wrote: Hi, If I''m not stupid for this, then the design of FolderBrowserDialog is very stupid. It only allow to strat browing from several predefined folder(Environment.SpecialFolder). What can I do if I want to start from any folder I want?That''s not what the RootFolder property means. The RootFolder property just tells the dialog what shell namespace it should be operating in, such as if you wanted to limit the browsing to only My Documents. It prevents the user from browsing *outside* of that special folder. The SelectedPath property, which is a string, can be set to any path that exists underneath the RootFolder special folder. That''s the path that appears initially when the dialog is opened. --Mike
It will not make things any better because "SelectedPath" must be underneath the "RootFolder". Why not strat from any folder I want, for example, my application running folder? "Mike Edenfield" wrote: Fei Li wrote: Hi, If I''m not stupid for this, then the design of FolderBrowserDialog is very stupid. It only allow to strat browing from several predefined folder(Environment.SpecialFolder). What can I do if I want to start from any folder I want?That''s not what the RootFolder property means. The RootFolder property just tells the dialog what shell namespace it should be operating in, such as if you wanted to limit the browsing to only My Documents. It prevents the user from browsing *outside* of that special folder. The SelectedPath property, which is a string, can be set to any path that exists underneath the RootFolder special folder. That''s the path that appears initially when the dialog is opened. --Mike
set the SelectedPath to your application running folder then ... "Fei Li" <Fe***@discussions.microsoft> wrote in message news:20**********************************@microsof t... It will not make things any better because "SelectedPath" must be underneath the "RootFolder". Why not strat from any folder I want, for example, my application running folder? "Mike Edenfield" wrote: Fei Li wrote: > Hi, > > If I''m not stupid for this, then the design of FolderBrowserDialog is > very > stupid. It only allow to strat browing from several predefined > folder(Environment.SpecialFolder). What can I do if I want to start > from any > folder I want?That''s not what the RootFolder property means. The RootFolder property just tells the dialog what shell namespace it should be operating in, such as if you wanted to limit the browsing to only My Documents. It prevents the user from browsing *outside* of that special folder. The SelectedPath property, which is a string, can be set to any path that exists underneath the RootFolder special folder. That''s the path that appears initially when the dialog is opened. --Mike
更多推荐
多么愚蠢的FolderBrowserDialog设计
发布评论