现在的位置: 首页 > 综合 > 正文

通过Process.Start调用window自带画图工具打开文件报错无法打开Program.png

2012年03月30日 ⁄ 综合 ⁄ 共 290字 ⁄ 字号 评论关闭

string fullname="D:\Program Files (x86)\西安羚羊网络科技有限公司\羚羊门窗产销系统\Pic\001.jpg"

Process pro = Process.Start(@"C:\WINDOWS\system32\mspaint.exe", fullname);

弹出错误  “无法打开Program.png”

错误原因:图片路径中存在空格“Program Files (x86)”

解决方法:

                Process pro = Process.Start(@"C:\WINDOWS\system32\mspaint.exe", "\"" + fullname + "\"");

抱歉!评论已关闭.