How would make this tutorial code print points incorrect order
sonar87 - Nov 03 2018 07:42 PM
set property with HTML content as string in from include not possible
LDDbyD - Oct 01 2018 06:33 AM
C++ pointers, references and Dynamic Memory... oh my :(
Siten0308 - Jul 31 2018 02:08 PM
Recent Blog Entries
Recent Status Updates
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
Populate tree view with remote computer directoriestreeview tcpclient directory populate remote treenode
Posted 19 November 2012 - 09:46 AM
Dose anyone have any solutions ?
The method i apropched is that on the server side i made that when i send the string "DirectoryInfo path" the server launches DirectoryInfo mypath returns the folders in a string and sends them back using NetworkStream, then i read the stream an add them to the treevies using a very raw and ** method ex:
TreeNode hdd1 = new TreeNode(@"C:\");
string folder =Regex.Split("return string from netStream", "\r\n");
foreach (string fd in folder)
and that is how i get the first folders in "C:\", as you can see it is a primitive method, any ideas on how can i do this cleaner ? or how to get the next subfolders and so on, or at least improve my code?
Thanks in advance.
Posted 20 November 2012 - 12:56 AM
about your code, the c: will be a problem, since most of computers has many disc units and usually c: is only for programs and installations.
If you want to open the sub-directory's branches you are going to need a recursive method that splits the path by \
Posted 23 November 2012 - 09:09 AM
I add directories to a TreeNode then use BinaryFormatter to serialize it and on the reciveing side the BinaryFormatter to deserialize it and add it to the TreeView