欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

.net 打开文件

程序员文章站 2022-06-08 10:00:44
...
 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;
相关标签: .net vc++