question on Select path from user.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 other methods to do this?
many thanks~~~.
Kel
 
You can use FolderBrowserDialog for selecting path.

This is available in VS.NET 2003 version only.
 
Thx Shakir Hussain~~~

Poor~~~ I am using ver.2002 right now. That's y i cant find it......
is there any other method to do that....
 
thx again~~~
can i ask one more simple question?
i have create a button and textbox,
When button1 onClick, it will call a function. the code as below:
private void button1_Click(object sender, System.EventArgs e)
{
ProgramStart(); <---- error
}

static void ProgramStart()
{
//Do something here....
string aaa;
aaa = textBox1.Text; <---- error
}
but seem doesn't work, for the code
aaa = textBox1.Text;
the error is ------- An object reference is required for the nonstatic field,
method, or property 'WinApp.Form1.textBox1'
many many thx~~~
 
Sorry....
I have solved it already....
Thx

kelkel said:
thx again~~~
can i ask one more simple question?
i have create a button and textbox,
When button1 onClick, it will call a function. the code as below:
private void button1_Click(object sender, System.EventArgs e)
{
ProgramStart(); <---- error
}

static void ProgramStart()
{
//Do something here....
string aaa;
aaa = textBox1.Text; <---- error
}
but seem doesn't work, for the code
aaa = textBox1.Text;
the error is ------- An object reference is required for the nonstatic field,
method, or property 'WinApp.Form1.textBox1'
many many thx~~~
 
Back
Top