473,386 Members | 1,819 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,386 software developers and data experts.

Set StartUp Path FolderBrowser

MAF
Does anyone know how to set a specific path for the FolderBrowser object?

here is my existing code.

private FolderBrowserDialog m_fb = new FolderBrowserDialog();

private DialogResult RunDialog()

{

m_fb.Description = m_description;

if (startUpPath == null)

{

m_fb.s.StartLocation = FolderBrowserFolder.Desktop;

}

else

{

//Set Startup path????

}

return m_fb.ShowDialog();

}
Nov 17 '05 #1
3 4406
Set the SelectedPath to the directory you want to be selected when the
FolderBrowserDialog first appears.

Brendan
"MAF" wrote:
Does anyone know how to set a specific path for the FolderBrowser object?

here is my existing code.

private FolderBrowserDialog m_fb = new FolderBrowserDialog();

private DialogResult RunDialog()

{

m_fb.Description = m_description;

if (startUpPath == null)

{

m_fb.s.StartLocation = FolderBrowserFolder.Desktop;

}

else

{

//Set Startup path????

}

return m_fb.ShowDialog();

}

Nov 17 '05 #2


Sorry I was using the FolderBrowser object and not the dialog.

Do you know of any way to setup the FolderBrowser starup path? or do I
need to change my code to use the dialog?

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
FolderBrowser as in from the System.Windows.Forms.Design namespace?

If that is the case... I don’t know how much help I can be on that as I have
no experience with it. Add to that the extremely limited documentation as it
seems intended only for use with the form designer.

Looking the System.Design.dll assembly in the object browser... it looks
like DirectoryPath is a read only property, and given that the only relevant
settable property is the StartLocation that accepts only a value of the
FolderBrowserFolder enum... you may be out of luck in using this the way you
want.

Brendan
"Fraser Michael" wrote:


Sorry I was using the FolderBrowser object and not the dialog.

Do you know of any way to setup the FolderBrowser starup path? or do I
need to change my code to use the dialog?

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4

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

Similar topics

3
by: Mantorok | last post by:
Hi all Have 2 perculiar problems at the moment: 1) SpecialFolder enum is not being picked up in Intelli-sense (but it is compiling ok when I use this enum) 2) FolderBrowser displays an...
5
by: JJ | last post by:
Hi, Using the app.config scenario and I added a Connectionstring to appSettings area in xml. In the value string I have the datasource equal to a absolute path on my dev machine. Now how can I...
6
by: kelkel | last post by:
my app needs users to input a path, they can type or click a "browse" button to select it. I only know "OpenFileDialog" to select file, can i apply "OpenFileDialog" in this case? or is there any...
7
by: Sakharam Phapale | last post by:
Hi All, I want to give option to user for selecting directory, just like for selecting file using OpenFileDialog control. How to make it possible?
2
by: jeff | last post by:
dear all, i am using .net 1.0 which don't have the .selectedpath property in FolderBrowser in VB.net . any hint to do it ? thanks.
0
by: letibal | last post by:
Hello, I have written a windows service that runs under the LocalSystem account (launched when the computer boots up). This service launches a GUI that contains several...
2
by: TarheelsFan | last post by:
I was trying to convert a VB project that contained the class FolderBrowser to C#. I have added a reference to System.Design, and the FolderBrowser class now shows up, but when I call ...
4
JodiPhillips
by: JodiPhillips | last post by:
MS Access2000 Hi everyone, I've searched the forums for an answer to this question and nothing jumps out at me. When a database is opened I want to automatically run code (at start-up) that...
6
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.