OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "文档(*.doc;*.docx)|*.doc;*.docx";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
if (openFileDialog1.FileName != "")
{
this.textBox3.Text = openFileDialog1.FileName;
}
}
在textBox3里面显示路径。