//添加一个 openFileDialog,
//单击button1时候的事件,name为文件名字,path为除了名字之外的路径
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
string name = Path.GetFileName(openFileDialog1.FileName);
string path = Path.GetDirectoryName(openFileDialog1.FileName);
}
是openfiledialog控件嘛?