Filter = "txt files (*.txt)|*.txt|A ..."/> Filter = "txt files (*.txt)|*.txt|A ...">

首页  >  文章  >  后端开发  >  .net 打开文件

.net 打开文件

巴扎黑
巴扎黑原创
2016-12-19 16:47:591592浏览

 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;

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn