入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

C# 浏览文件夹地址

创建时间:2016-07-07 投稿人: 浏览次数:1103

C# 浏览文件夹地址

<pre name="code" class="csharp">            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.Description = "请选择文件路径";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string foldPath = dialog.SelectedPath;
                txtFilePath.Text = foldPath;
            }




C# 浏览文件地址

<pre name="code" class="csharp">            OpenFileDialog fileDialog = new OpenFileDialog();
            fileDialog.Multiselect = true;
            fileDialog.Title = "请选择文件";
            fileDialog.Filter = "所有文件(*.*)|*.*";
            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                string file = fileDialog.FileName;
                txtFilePath.Text = file;
            }




C# 打开文件夹

            System.Diagnostics.Process.Start("Explorer.exe", "c:\");//打开文件夹


声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像