AEII
asked on
Code Snip C#
I am sure somewhere there is the following code I would like to get:
File Path Box with Browse Button that opens the Windows file browser and when the file is selected
it puts it in the Path Field..
File Path Box with Browse Button that opens the Windows file browser and when the file is selected
it puts it in the Path Field..
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can place the dialog on your form too, in 2005 at least
its a choice depending on your application, so no correction but an addition i tested before posting :)
yes...
FolderBrowserDialog wasnt included in VS.Net 2002 (.net 1.0 FCL) (the code wont work for .net 1.0)
FolderBrowserDialog was included in VS.Net 2003 (.net 1.1 FCL) but wasnt included in the toolbox..(the code will work for .net 1.1)
Finally in vs 2005 (.net 2.0) the control included in the toolbox (the code will work for .net 2.0)
FolderBrowserDialog wasnt included in VS.Net 2002 (.net 1.0 FCL) (the code wont work for .net 1.0)
FolderBrowserDialog was included in VS.Net 2003 (.net 1.1 FCL) but wasnt included in the toolbox..(the code will work for .net 1.1)
Finally in vs 2005 (.net 2.0) the control included in the toolbox (the code will work for .net 2.0)
:) you are correct i should've mentioned that in the comment
ASKER
Well we are getting close, but one more thing ...
The FolderBrowser only get to Folder Level ... I need to select
a specific .exe (file level)
The FolderBrowser only get to Folder Level ... I need to select
a specific .exe (file level)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. placed a folderbrowsedialog, a button and a textbox on a form
2. and used this code in the button click eventhandler
--------
folderBrowserDialog1.ShowD
if(folderBrowserDialog1.Se
textBox1.Text = folderBrowserDialog1.Selec
--------
3. it will show the selected path in the textbox1 if one is selected
hope this helps a bit
bruintje