FolderBrowserDialog提示用户选择文件夹滴
2013-12-16 09:59
489 查看
示例:
using (FolderBrowserDialog dialog = new FolderBrowserDialog()) { dialog.Description = "请选择存放音乐的文件夹"; dialog.ShowNewFolderButton = false; if (dialog.ShowDialog() != DialogResult.OK) return; this.SearchOneFolder(dialog.SelectedPath); } if (Directory.Exists(path)) { string[] files = Directory.GetFiles(path, "*.mp3"); if (files != null && files.Length > 0) { foreach (var filePath in files) { string name = Path.GetFileName(filePath); this.lvPCMusic.Items.Add(new ListViewItem(new string[] { name, filePath }) { Tag = filePath }); } } }
相关文章推荐
- WPF:自定义Metro样式文件夹选择对话框FolderBrowserDialog
- 选择文件夹的控件Folderbrowserdialog
- C# FolderBrowserDialog Scroll to Selected Path 文件夹选择框初始位置没有滚动到默认文件夹
- C#使用FolderBrowserDialog类实现选择打开文件夹方法详解
- FolderBrowserDialog组件选择文件夹
- 用FolderBrowserDialog选择一个文…
- FolderBrowserDialog实现默认选中上次选择的目录
- FolderBrowserDialog(文件夹浏览对话框)
- VC++ 实现文件夹选择对话框.FolderBrowser
- FolderBrowserDialog(文件夹浏览对话框) 使用详解和例子
- FolderBrowserDialog(文件夹浏览对话框)
- WPF 获得文件夹路径 FolderBrowserDialog
- WPF FolderBrowserDialog 获取带有空格的文件夹路径后操作文件无效的处理
- C#选择目录对话框FolderBrowserDialog
- C# Winform选择目录路径(FolderBrowserDialog) 与选择文件名称
- 文件选择对话框filedialog,OpenFileDialog,FolderBrowserDialog
- FolderBrowserDialog(文件夹浏览对话框)
- 确定文件的位置--浏览文件夹对话框folderBrowserDialog
- 用FolderBrowserDialog选择一个文件路径
- C#选择目录对话框FolderBrowserDialog