Click here to Skip to main content
15,914,416 members
Home / Discussions / C#
   

C#

 
Generallocalized dateTimepicker Pin
Jassim Rahma22-Jan-05 10:19
Jassim Rahma22-Jan-05 10:19 
Generaldesign changes in runtime!!! Pin
Jassim Rahma22-Jan-05 10:17
Jassim Rahma22-Jan-05 10:17 
GeneralRe: design changes in runtime!!! Pin
spif200123-Jan-05 20:34
spif200123-Jan-05 20:34 
GeneralRe: design changes in runtime!!! Pin
Jassim Rahma25-Jan-05 1:30
Jassim Rahma25-Jan-05 1:30 
QuestionHow to scroll a windows form? Pin
E6AD22-Jan-05 10:06
E6AD22-Jan-05 10:06 
AnswerRe: How to scroll a windows form? Pin
Stefan Troschuetz23-Jan-05 0:06
Stefan Troschuetz23-Jan-05 0:06 
Generalneed beginner's treeView help Pin
SuperStruct22-Jan-05 9:03
SuperStruct22-Jan-05 9:03 
GeneralRe: need beginner's treeView help Pin
mav.northwind22-Jan-05 11:19
mav.northwind22-Jan-05 11:19 
It would help if you told us what exactly are you having problems with...

The process itself is fairly straightforward, if you know how to use recursion.
You create a function where you have a directory and a TreeNode as parameter, let's say
void AddDirectoryNodes(TreeNode parent, string path)

In this function you get yourself a list of all subdirectories of path (the Directory class has a method for this).
For each subdirectory you create a new TreeNode (with the subdirectory's name as node name) and add it to parent's Nodes collection.
Then you call AddDirectoryNodes() from within itself with the newly added TreeNode as parent and the current subdirectory as path.
Voila, you get a nice tree structure of all directories.

Then all that remains is to enumerate all your drives, add a TreeNode for each drive and then call AddDirectoryNodes for these drive nodes.

Did this description help?

mav
GeneralRe: need beginner's treeView help Pin
SuperStruct26-Jan-05 5:23
SuperStruct26-Jan-05 5:23 
GeneralCreating Custom DataGrid Column Pin
Anonymous22-Jan-05 8:19
Anonymous22-Jan-05 8:19 
Generalsimple question about serviceName when developing a win service Pin
liyang yu22-Jan-05 8:10
liyang yu22-Jan-05 8:10 
GeneralRe: simple question about serviceName when developing a win service Pin
Andy Brummer23-Jan-05 19:03
sitebuilderAndy Brummer23-Jan-05 19:03 
GeneralAccess database Pin
webhay22-Jan-05 4:43
webhay22-Jan-05 4:43 
GeneralRe: Access database Pin
Colin Angus Mackay22-Jan-05 8:04
Colin Angus Mackay22-Jan-05 8:04 
Questionhow to package the C# application and MS-SQL(7) ?? Pin
Shahrouz Sadeghi22-Jan-05 4:37
Shahrouz Sadeghi22-Jan-05 4:37 
AnswerRe: how to package the C# application and MS-SQL(7) ?? Pin
Nick Parker22-Jan-05 6:47
protectorNick Parker22-Jan-05 6:47 
GeneralRe: how to package the C# application and MS-SQL(7) ?? Pin
Shahrouz Sadeghi24-Jan-05 21:46
Shahrouz Sadeghi24-Jan-05 21:46 
GeneralParsing Word documents Pin
Member 159449022-Jan-05 4:27
Member 159449022-Jan-05 4:27 
GeneralRe: Parsing Word documents Pin
Andy Brummer23-Jan-05 18:59
sitebuilderAndy Brummer23-Jan-05 18:59 
QuestionSet VScrollBar & HScrollBar colors? Pin
bbzzdd22-Jan-05 4:25
bbzzdd22-Jan-05 4:25 
AnswerRe: Set VScrollBar & HScrollBar colors? Pin
Nick Parker22-Jan-05 6:42
protectorNick Parker22-Jan-05 6:42 
GeneralListView Pin
Newbie_Toy22-Jan-05 4:00
Newbie_Toy22-Jan-05 4:00 
QuestionHow to call a function in VC++ DLL from C# Pin
Anonymous22-Jan-05 1:44
Anonymous22-Jan-05 1:44 
GeneralMarshalling of SAPI4 interfaces/structs Pin
mav.northwind22-Jan-05 0:09
mav.northwind22-Jan-05 0:09 
Generalprogress bar Pin
Newbie_Toy21-Jan-05 19:35
Newbie_Toy21-Jan-05 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.