一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

选择文件夹的对话框!

时间:2022-07-02 11:34:18 编辑:袖梨 来源:一聚教程网

    public class FolderDialog : FolderNameEditor
    {
        FolderNameEditor.FolderBrowser fDialog = new System.Windows.Forms.Design.FolderNameEditor.FolderBrowser();
        public FolderDialog()
        {
        }
        public DialogResult DisplayDialog()
        {
       return DisplayDialog("请选择一个文件夹");
        }
        
        public DialogResult DisplayDialog(string description)
        {
       fDialog.Description = description;
       return fDialog.ShowDialog();
        }
        public string Path
        {
       get
       {
           return fDialog.DirectoryPath;
       }
        }

热门栏目