Restricted FolderBrowserDialog, recommended solution

送分小仙女□ 提交于 2019-12-04 18:02:50

You best bet is to use a control like FolderView from Shell MegaPack - it is customizable in the way you want it - you can turn of shell context menus, renaming, drag-drop, keyboard shortcuts, etc,

DISCLAIMER: We are the developers of FolderView mentioned above.

In the end, we solved it implementing our own control. It was a lot simpler than we thought. In short, we just made a class inherit from System.Windows.Forms.Form, with a System.Windows.Forms.TreeView on the left and a System.Windows.Forms.ImageList on the right to show the current folder's contents. Then we DllImport'ed SHGetFileInfo and ExtractIconEx from Shell32 in order to make the TreeView and ImageList's icons look like Explorer's, and voila!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!