Hi

I am trying to open a dialog box so that I would be able to select a folder so that I will return the filenames in that folder. I was trying to do this using the openfiledialog but my problem is that when I am on the folder I want to select, I can only select open to get to the files. Is there a similar dialog where it allows me to select a folder to take its path rather than open it. The following is the code i have used so far:

Code:
private void button1_Click(object sender, EventArgs e)
        {
            string[] filepaths;
            string path;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                path = Path.GetDirectoryName(openFileDialog1.FileName);
                filepaths = Directory.GetFiles(path);
                textBox1.Text = path;
            }
        }
Thank you in advance.