Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every one,
I convey my thanks in advance. I am a VB .net developer. I need to show the folders and files in a Tree view in the mean time, I need to do the create and delete of folders using the same Tree view. Can anyone help me. I have seen lots of projects in the web. But all are just only explore the folders in tree view but i need to create and also delete the folders also. Any one help me.....
Posted

Have a look here: Walkthrough: Manipulating Files and Directories in Visual Basic[^] and here: TreeView Explorer using VB.NET 2008[^]

It's pretty straightforward. Try!
 
Share this answer
 
In addition to solution posted by Maciej Los, you definitelly should look at System.IO namespace which contain all informations about managing files and directories:

http://msdn.microsoft.com/en-us/library/system.io.aspx[^]

You should distinct between manage data (such as create/rename/delete file or directory) and presenting that data on TreeView (or any other component). You are not creating/deleting files or directories via TreeView component. It's purpose is to present data only.

You can access all elements in TreeView control using TreeView.Nodes property. Then you can get what data is selected (file or directory) and do whatever you want with that information. If you have selected directory then you can add or delete child directories. It's all up to you.
Good start with using TreeView component is here:
http://www.dotnetperls.com/treeview[^]
http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview%28v=vs.110%29.aspx[^]

Cheers!
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900