private void ButtonBrowseProjectLocationClick(object sender, EventArgs e) { var sfd = FolderUtility.CreateBrowseForFolder(textBoxProjectLocation.Text); if (sfd.ShowDialog(this) == DialogResult.OK) { textBoxProjectLocation.Text = Path.GetDirectoryName(sfd.FileName); } }