473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to add My Documents to a TreeView

I'm looking at using a TreeView control and can see how to fill in
MyComputer with directory and file names.

But I have no idea of how to include things like My Documents and My Network
Places

Anyone how to do that.
Thanks

Nov 20 '05 #1
2 1650
Stuff like My Computer and My Network Places you have to add manually while filling the treeview, as you cannot scan recursively through drives/directories to find them. Mapped network drives can be added as drives, and you can use the FileScriptingObject to determine the type of drive they are and so apply the correct icon (by using the shell to determine the default icon for the specific type of drive). My Documents is a type of "special folder" that is different for each user, so you'll have to add the tree view item and icon manually in your code, determine which user is logged in, then locate the path within Documents and Settings that applies to that particular user's My Documents folder, and remember to open that path when the item is activated. As far as determining attached saved network connections to add to the My Network Places folder, you'll probably have to use the shell for that too. Unless you really want to, I'd download a control or use the Open Directory dialog to do what you want to do, as it gets a little intensive programmatically
Nov 20 '05 #2
> as it gets a little intensive programmatically.

Sure sound like it, but I cut your reply and paseted into my code and am
going to give it a try.

Thanks
Cal
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Davinder | last post by:
can anyone recommend a good tool to convert documents to HTML on the fly. I need to integrate this tool with a VB app so it must have an API. thanks in advance Davinder davinder@gujral.co.uk
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
5
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a...
0
by: SamSpade | last post by:
I'm looking at using a TreeView control and can see how to fill in MyComputer with directory and file names. But I have no idea of how to include things like My Documents and My Network Places ...
6
by: L.M | last post by:
Hello, I knew how to use the treeview under VB6. After migrating to .NET, well, I'm lost. I try to add a new node, either to the same level or as a child to a selected node in the treeview....
14
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
2
by: bstauffer | last post by:
Thanks in advance to anyone who has any ideas on this. I have an ASP.Net 2.0 website set up on a working production web server. The purpose of the site is to provide access to various documents...
2
by: =?Utf-8?B?SWtlciBMbGFub3M=?= | last post by:
I have to xml documents. I want to compare them and show them in two treeview controls. The one on the left is the new version of the document and the one is the right is the old version of the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.