简体   繁体   English

vb.net如何做一个DOS风格的树

[英]vb.net how to do a dos style tree

Hi all im trying to create a basic screen saver that has a screen split into two, the left hand side will be similar to the dos command tree where it lists all files and folders, the right hand side will be where the files contents are displayed. 大家好,我正在尝试创建一个基本的屏幕保护程序,该屏幕保护程序将屏幕分为两部分,左侧将类似于dos命令树,其中列出了所有文件和文件夹,右侧将是显示文件内容的地方。 So when the application starts up the tree on the left is populated and then the application starts to go through all the files one by one opening them and scrolling through them if possible. 因此,当应用程序启动时,将填充左侧的树,然后应用程序开始逐个打开所有文件,并在可能的情况下滚动浏览所有文件。

So here is where im stuck i cant seem to figure out how to print a directory tree to the screen. 所以这里是即时通讯卡住的地方,我似乎无法弄清楚如何在屏幕上打印目录树。

It seems like a trivial question i know but i cant for the life of me find a solution as elegant as the dos command. 我知道这似乎是一个琐碎的问题,但是我无法为我的生活找到一个像dos命令一样优雅的解决方案。

As always any help would be appreciated. 一如既往,任何帮助将不胜感激。

You can use the TreeView control to display the folders and files. 您可以使用TreeView控件显示文件夹和文件。 Just populate it with the folder contents, recursively if necessary. 只需用文件夹内容填充它,如有必要,递归地填充它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM