简体   繁体   中英

How do I change the root folder of the Folder Browser object to a specific folder/path other than system folders?

This does not work:

fbFolderBrowser.RootFolder = @"C:\A Folder I Created\Test1\";

When the user clicks the button, I want to have the above folder selected.

How would I go about doing this?

代替RootFolder您需要设置SelectedPath

fbFolderBrowser.SelectedPath = @"C:\A Folder I Created\Test1\";

如果我没记错的话:

fbFolderBrowser.InitialDirectory = @"C:\A Folder I Created\Test1\";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM