开发者

How can I select a whole folder in vb.net open file dialog? [closed]

开发者 https://www.devze.com 2022-12-22 06:05 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopen开发者_StackOverflow中文版ed, visit the help center. Closed 10 years ago.

Is it possible to select the whole folder in VB.NET open dialog box?

By this I mean, open the dialog box and navigate through the folder and then select an entire folder not an individual file.


You can't select a folder with the OpenFileDialog. You can select a folder with the FolderBrowserDialog.

Are you looking to select all the files in a folder? If so, use a FolderBrowserDialog to allow users to select a folder and call code similar to the following:

Dim files As String() = Directory.GetDirectories(folderBrowserDialog1.SelectedPath) 

You can also go ahead and use an OpenFileDialog and set its Multiselect property to true. This will allow your users the select more than one file in the dialog.

Does that answer your question?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号