| | |
Display System Directory
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2009
Posts: 270
Reputation:
Solved Threads: 54
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: 243 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 2008 access add advanced application array assignment basic box button buttons center click code combo convert cpu data database datagrid datagridview dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees error excel exists firewall function image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity page pan picturebox picturebox2 port print printing printpreview problem record regex reports" reuse right-to-left save savedialog search serial socket sorting sql sqldatbase storedprocedure string structures studio temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet vista visual visualbasic visualbasic.net visualstudio2008 web winsock wpf xml





