Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C programing & directory

Status
Not open for further replies.

mhamed

Advanced Member level 4
Joined
Jul 28, 2004
Messages
114
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Activity points
827
Hi
I want to make a Directory Hirarchy (such as we have seen when we click browse button)
in VC++ or C#
but i don't know what to do.
i know it is related to treeview but how can i tell computer to use my PC information for tree nodes.Is there anybody who can help me?
 

checkmate

Advanced Member level 3
Joined
Feb 25, 2004
Messages
832
Helped
178
Reputation
356
Reaction score
125
Trophy points
1,323
Location
Toilet Seat
Activity points
7,811
I'm assuming you are using .NET.
You already know that you will have to feed data into the Treeview class.
For file/directory enumeration, look at the FileInfo, DirectoryInfo and FileSystemInfo classes. The enumeration process will be recursive in nature since we are dealing with tree structures. You may google around for algorithms to traverse tree structures.
Or maybe a simple FileDialog may solve your problem?
 

mhamed

Advanced Member level 4
Joined
Jul 28, 2004
Messages
114
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Activity points
827
Of course i use .NET;and i am new in programming with them.you know i read about File/DirectoryInfo and also TreeView.
I can programming them seprately but cannot relate them to each other if you have an idea let me know.
THX
 

tcsa35

Full Member level 3
Joined
Mar 19, 2002
Messages
170
Helped
10
Reputation
20
Reaction score
8
Trophy points
1,298
Activity points
1,507
Hi,
you can use this VC++ codes for example

hxxp://www.codeproject.com/useritems/drivebrowsingtree.asp

This article use a CTreeView control to display all the system folders and files like the left pane of the Windows-Explorer, The Icons and File Types unfortunately have been hardcoded in the project, unlike the ones available on the Windows Explorer, The Icons are a Part of the Project and not picked up from the Windows Operating System.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top