我在打开一个(.tif)文件时出了问题,它会抛出一个“系统找不到指定的文件”。下面是我关于如何打开(.tif)文件的代码:
try
{
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = "MSPVIEW.exe";
p.Arguments = @"C:\New folder\sample.TIF";
p.UseShellExecute = false;
p.ErrorDialog = false;
p.RedirectStandardOutput = true;
p.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start(p);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}但是当我要打开一个(.txt)文件时,它没有问题。下面是我关于如何打开(.txt)文件的代码:
try
{
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = "notepad.exe";
p.Arguments = @"C:\New folder\NewTextFile.txt";
p.UseShellExecute = false;
p.ErrorDialog = false;
p.RedirectStandardOutput = true;
p.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start(p);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}是否有人有相同的问题打开(.TIF)文件?或者提供一些解决方案来解决这个问题?
发布于 2015-05-18 19:55:11
这听起来像是mspview.exe或sample.TIF的路径无效。您能指定mspview.exe的完整路径并打开Windows来验证sample.TIF的路径吗
https://stackoverflow.com/questions/30311495
复制相似问题