'显示打开文件夹对话框 With Application.FileDialog(msoFileDialogFolderPicker) .Show Then Exit Sub '未选择文件夹 strFolder = .SelectedItems() End With '获取文件夹中的所有文件列表 varFileList = fcnGetFileList(strFolder) If Not IsArray(varFileList) Then MsgBox "未找到文件", vbInform
以下示例代码展示如何调用系统的文件夹选择对话框: Private Function SelectFolder(ByVal Describe As String, Optional ByVal ShowNewFolder As Boolean = True) As String Using nOpen As New System.Windows.Forms.FolderBrowserDialog() nOpen.Description = Describe nOpen.ShowNewFolderB
System.Diagnostics.Process.Start("Explorer.exe", @"C:\Users\gnt-wangt\Documents\Visual Studio 2010Projects\Portal\Portal\Image\Uploads\ToolsOrPlug"); 第一个参数用什么打开.第二个参数为需要打开文件夹的路径.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TestFolderBrowserDialog { public partial class Form1 : Form { public Form1(
开发中有时会想实现"选择某个文件夹"的效果: 在WPF中,使用Microsoft.Win32.OpenFileDialog只能选择文件,FolderBrowserDialog只能用树型的方式选择文件夹,很不好用. 终于找到一个办法,使用Windows API Code Pack 在VS里打开Package Manager Console后输入Install-Package WindowsAPICodePack-Shell获取包后 就可以像这样打开选择文件夹Dialog了: var di