如何从openfiledailog菜单打开文件时禁用根目录 [英] how to make disabled root directory while file open from openfiledailog menu

查看:71
本文介绍了如何从openfiledailog菜单打开文件时禁用根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在openfiledailog.User打开文件时禁用所有禁用系统。

I want to make everything disabled while opening file from openfiledailog.User restricted to go in system.

推荐答案

我无法读懂你的想法,但如果我猜你想要在使用OpenFileDialog时限制用户使用特定文件夹。



所以,我建议你自己重写Dialog(因为默认的Dialog不能这样做),或者使用ListBox并使用Directory.GetFile列出允许目录中的所有文件。
I cannot read your mind, but if i guess you wanna "restrict the user to a particular folder" when using OpenFileDialog.

So, I recommend you to rewrite the Dialog yourself (cause the default Dialog cannot do this), or use a ListBox and use Directory.GetFile to list all the files in your "allowing" directory.


这篇关于如何从openfiledailog菜单打开文件时禁用根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆