- OpenFileDialog FD = new OpenFileDialog();
- string filenname = "";
- string path = "";
- if (FD.ShowDialog() == DialogResult.OK)
- {
- filenname = System.IO.Path.GetFileName(FD.FileName);
- path = System.IO.Path.GetDirectoryName(FD.FileName);
- }
- MessageBox.Show(filenname, "Filename");
- MessageBox.Show(path, "Directory");
No comments:
Post a Comment