Sei sulla pagina 1di 6

Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Total Online Users: 1708 Article Submission Guidelines

Home | Forums | Videos | Advertise | Certifications | Downloads | Blogs | Interviews | Jobs | Beginners | Training | Consulting Submit an Article Submit a Blog

Search : Go Advanced Search »


Login

Enter UserID or Email


Home » Windows Forms » Advanced File Explorer using C# and Windows Forms

●●●●●●●●●●●●●●
Page Views : 49652
Advanced File Explorer using C# and Windows Forms Downloads : 2318
Remember Me
Rating :
Sign In Register By Shail Srivastav April 12, 2004 Level : Intermediate
Forgot Password The aim is to create an application which (enhanced windows explorer) consists a tree view where someone
Forgot Username can see the files available in the existing drives up to certain levels.
Why Register
Print Post a comment Similar Articles Share
Jump to Email to a friend Bookmark Author's other articles
Technology
Website Download Files: AdvancedFileExplorer.zip 0 Share

Sponsored by
Sponsored by

The aim is to create an application which (enhanced windows explorer) consists a tree view where
someone can see the files available in the existing drives up to certain levels. (In this case 4). You can
easily change it to any level you want. Also when someone selects a file from the tree view, we need to
display the different properties of this file in the labels in the group box. Then when he user selects some
file and presses the Compress button, the file gets compressed and like wise it is to be decompressed.

I create a windows application with a tree view showing the files in the drives as in fig 1.The user can
expand the up to 4 levels to see the files/directories.

The details of the selected file or folder like the file name, date created, size etc are shown in the labels
in the Details groupBox. (See Figure 1).

Also the Data GroupBox contains a multi-line text box which shows the contents of the selected file.

Become a Sponsor

1 de 6 05/05/2011 12:37
Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Similar Articles Most Read

Enhanced Windows Explorer in VS 20


Win Forms
Download file using Multithreading in

FTP Explorer in C#(Beta 2)

Customized Solution & Project Explo


and Windows Forms
Windows Explorer in C#

Sponsored by

Become a Sponsor

Figure 1.

This function quits after 4 levels of any branch, actually windows explorer does the same thing. Initially C# Corner no Facebook
its load only couple of levels and when you click on some branch its reload that branch to deep levels.
Curtir 861

If you try o load all the level, then its going to take up to 2-5 minutes depending upon your machine
speed.

private void FillDirectory(string drv, TreeNode parent, int level)


{
try

2 de 6 05/05/2011 12:37
Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Become a Sponsor {
// I want to go only upto 4 level.
Resources
level++;
About Us if (level > 4)
ASP.NET Hosting return;
Authors DirectoryInfo dir = new DirectoryInfo(drv);
Book Chapters if (!dir.Exists)
Book Reviews throw new DirectoryNotFoundException("directory does not exist:"+drv);
C# Consulting foreach(DirectoryInfo di in dir.GetDirectories())
C# Training
{
TreeNode child = new TreeNode();
Downloads
child.Text = di.Name;
Media Kit
parent.Nodes.Add(child);
News & Events
FillDirectory(child.FullPath, child, level);
Newsletter }
Prizes }
Product Reviews catch(Exception ex)
Resources {
Tips ex.ToString();
Tools }
User Groups }

Our Network

.NET Heaven
C# Corner
DbTalks
Interview Corner
Longhorn Corner
Mindcracker
VB.NET Heaven

3 de 6 05/05/2011 12:37
Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Figure 2.

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.

Login to add your contents and source code to this article

[Top] Rate this article 1 2

About the author Looking for C# Consulting?

4 de 6 05/05/2011 12:37
Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Shail Srivastav C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a t


company, our consultants are well-known experts in .NET and many of the
and trainers. We specialize in Microsoft .NET development and utilize Agile
Extreme Programming practices to provide fast pace quick turnaround resu
development model is a mix of Agile Development, traditional SDLC, and W

Click here to learn more

Clickatell
Clickatell is the largest global Online SMS mobile messaging gateway.Click here to find out how Clickatell can enhance your communication and extend your reach wit
relevant mobile messages.

Post a Feedback, Comment, or Question about this article Sponsored by

Subject:

Comment:

Submit

Become a Sponso

Comments

by lee On April 13, 2007

5 de 6 05/05/2011 12:37
Advanced File Explorer using C# and Windows Forms http://www.c-sharpcorner.com/UploadFile/ssrivastav/AdvancedFileExplorerusingCSharpandWindow...

Thx by Rashadov On August 17, 2008


Thx bro very Good Example

Re: Thx by shail On December 10, 2008


Thanks

sample by Martin On February 21, 2009


I think the example app is a horrible mess. This is not good programming technique.

Hosted by MaximumASP | Found a broken link? | Contact Us | Terms & conditions | Privacy Policy | Site Map | Suggest an Idea | Advertise With Us Current Version: 5.2011.3.12
© 2011 contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.

Channels: Jobs | Interviews | Consulting | Training | Photos | Authors | Tips | Forums | Blogs
Programming: C# | Visual Basic | ASP.NET & Web Development | C++ | Other .NET Languages | Windows Vista | XAML | Tutorials
Sponsors: ASP.NET Hosting | Cbeyond Cloud Services | Clickatell | DevExpress | DynamicPDF | Nevron | RedGate Software | Team Foundation Hosting

6 de 6 05/05/2011 12:37

Potrebbero piacerti anche