Home  >  Article  >  Backend Development  >  .net open file

.net open file

巴扎黑
巴扎黑Original
2016-12-19 16:47:591558browse

 OpenFileDialog^ dlgOpenFile = gcnew OpenFileDialog ();
String^ fileName;
dlgOpenFile->InitialDirectory = "D:\\";
dlgOpenFile->Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
dlgOpenFile->FilterIndex = 1;
dlgOpenFile->RestoreDirectory = true ;
dlgOpenFile->ShowDialog();
fileName = dlgOpenFile->FileName;
TB_Path->Text = fileName;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn