| | |
Display System Directory
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2009
Posts: 270
Reputation:
Solved Threads: 55
try this:
vb Syntax (Toggle Plain Text)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click treeDir.Nodes.Clear() CreateDirTree(Nothing, Environment.SystemDirectory) End Sub Private Sub CreateDirTree(ByVal fromNode As TreeNode, ByVal basePath As String) Dim newDir As TreeNode Dim subDir As String For Each singleDir As String In My.Computer.FileSystem.GetDirectories(basePath) subDir = My.Computer.FileSystem.GetName(singleDir) If fromNode Is Nothing Then newDir = treeDir.Nodes.Add(subDir) Else newDir = fromNode.Nodes.Add(subDir) End If CreateDirTree(newDir, My.Computer.FileSystem.CombinePath(basePath, subDir)) Next singleDir End Sub
![]() |
Similar Threads
- Completing a Loop to Search the Directory (Java)
- Persistent Compiler Error on a Directory System (Java)
- ASP How To Display Always The System Date (ASP)
- display the System.out.print msgs (Java)
- Program to display System date and Time in VC++ 6.0 (C++)
- Display System Time in VC++.net (Game Development)
- System 32 Coming Up at Startup (Viruses, Spyware and other Nasties)
- can't bring up display properties, XP-Pro (Windows NT / 2000 / XP)
- I've got Trojan.Holax... is this bad? (Viruses, Spyware and other Nasties)
Other Threads in the VB.NET Forum
- Previous Thread: Searching for a Solutions Manual
- Next Thread: tokenize text input
Views: 244 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 30minutes 2005 2008 access application arithmetic array basic binary bing button buttons c# center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dll dropdownlist error excel file-dialog folder ftp google hardcopy highlighting image images inline listview login math mobile ms navigate net networking opacity output peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save savedialog searchbox serial server soap sorting sql string syntax tcp text textbox timer toolbox trim updown upload usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





