private void btDirectory_Click(object sender, System.EventArgs e) { Vista_Api.FolderBrowserDialog _Dlg = new Vista_Api.FolderBrowserDialog(); _Dlg.SelectedPath = txtDirectory.Text; if (_Dlg.ShowDialog() == DialogResult.OK) { txtDirectory.Text = _Dlg.SelectedPath; } }
private void btPath_Click(object sender, System.EventArgs e) { TextBox _Txt = GetPathTextBoxFromButton((Button) sender); if (_Txt != null) { Vista_Api.FolderBrowserDialog _Dlg = new Vista_Api.FolderBrowserDialog(); _Dlg.SelectedPath = _Txt.Text; if (_Dlg.ShowDialog() == DialogResult.OK) { _Txt.Text = _Dlg.SelectedPath; } } }