Use the FolderBrowserDialog class
if (ofd.ShowDialog() == DialogResult.OK)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = Path.GetDirectoryName(ofd.FileName);
dialog.ShowDialog();
textBox1.Text = dialog.SelectedPath;
}