Process cmd = new Process()
cmd.StartInfo.FileName = "cmd"
cmd.StartInfo.RedirectStandardOutput = true
cmd.StartInfo.RedirectStandardInput = true
cmd.StartInfo.UseShellExecute = false
cmd.StartInfo.CreateNoWindow = falsecmd.Start()
cmd.StandardInput.WriteLine(@"d:\a.doc")//这里可以换纳尺成从文洞老高件对含氏话框取得文件名
cmd.Close()
设置Filter属帆大性OpenFileDialog file = new OpenFileDialog()
file.Filter = "JPG图片|*.jpg"
这颤塌样打开文件的时候就只显示jpg文件,具体的你可以百度,望采纳茄轿圆
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)