OpenFileDialog dlgOpenFile = new OpenFileDialog();
dlgOpenFile.Title = “open the path”;
dlgOpenFile.InitialDirectory = @“E:\Common\printer_tem”;
dlgOpenFile.Filter = “printer file | *.btw;”;
dlgOpenFile.FilterIndex = 1;
dlgOpenFile.ShowReadOnly = true;
DialogResult dr = dlgOpenFile.ShowDialog();
if (dr == DialogResult.OK)
{
printer_path = dlgOpenFile.FileName;
textBox13.Text = printer_path;
}
else
{
printer_path = “”;
}
c# 选择文件浏览框
最新推荐文章于 2024-07-09 06:47:12 发布