open folder

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 68
Reputation: gallian99 is an unknown quantity at this point 
Solved Threads: 0
gallian99 gallian99 is offline Offline
Junior Poster in Training

open folder

 
0
  #1
May 13th, 2009
Hi,

how can i open and show a folder in windows using C#. like after complting some task i want the app to open the particular folder and present it to the user.

like we open any folder by double clicking on it. I want to do it the same thru code

thx
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,955
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 282
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: open folder

 
0
  #2
May 13th, 2009
You can use the OpenFileDialog or FolderBrowserDialog from the toolbox.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 68
Reputation: gallian99 is an unknown quantity at this point 
Solved Threads: 0
gallian99 gallian99 is offline Offline
Junior Poster in Training

Re: open folder

 
0
  #3
May 13th, 2009
Originally Posted by ddanbe View Post
You can use the OpenFileDialog or FolderBrowserDialog from the toolbox.
i'm already using that in my program. But I couldn't figure out how I can open and show the folder to the user, not in my program and not for file selecting or browsing folders;

Ok in short this is what the program does

1. Ask the user to browse folder
2. Read all the files within the folder
3. check files for integrity
4. and then finishes

Now I want to do

5. Show the folder to the user in which the processing was done. i.e. open that folder in windows. thats it

I hope i'm clear now

thx
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,955
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 282
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: open folder

 
0
  #4
May 13th, 2009
You make it perfectly clear!
OpenFileDialog has a property called InitialDirectory, feed it the folder the user was browsing, is this what you want?
Or do you want to take your app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 68
Reputation: gallian99 is an unknown quantity at this point 
Solved Threads: 0
gallian99 gallian99 is offline Offline
Junior Poster in Training

Re: open folder

 
0
  #5
May 13th, 2009
Originally Posted by ddanbe View Post
You make it perfectly clear!
OpenFileDialog has a property called InitialDirectory, feed it the folder the user was browsing, is this what you want?
Or do you want to take your app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?
Yes, I want the later case

to take my app to the background, to manipulate XP? Vista? to open a FileDialog for the folder which your app was manipulating?

so the app can sshow the user which files in the folder were processed.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: open folder

 
0
  #6
May 13th, 2009
No, Danny they need to do that
System.Diagnostics.Process.Open("DirectoryPath"); C# Sample
  1. System.Diagnostics.Process.Open("C:\\Windows");
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,955
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 282
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: open folder

 
0
  #7
May 13th, 2009
Thanks for pointing this out Ramy!
Did not know this.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC