
private voID button1_Click(object sender,EventArgs e){ Process p = new Process(); p.StartInfo.filename = "C:/Users/Valy/Desktop/3dcwrelease/3dcw.exe"; p.Start();} 3dcw.exe是一个用于OpenGL图形的应用程序.
问题是,当我单击按钮时,可执行文件运行,但它无法访问其纹理文件.
有没有人有办法解决吗?我觉得像在后台加载位图文件,然后运行exe文件,但我怎么能这样做?
解决方法 我在互联网上搜索了你的问题的解决方案,发现这个网站: http://www.widecodes.com/0HzqUVPWUX/i-am-lauching-an-opengl-program-exe-file-from-visual-basic-but-the-texture-is-missing-what-is-wrong.html在C#代码中,它看起来像这样:
string exepath = @"C:\Users\Valy\Desktopdcwreleasedcw.exe";processstartinfo psi = new processstartinfo();psi.filename = exepath;psi.WorkingDirectory = Path.GetDirectoryname(exepath);Process.Start(psi);@H_403_2@ 总结
以上是内存溢出为你收集整理的c# – 使用Process.Start运行程序时,无法找到它的资源文件全部内容,希望文章能够帮你解决c# – 使用Process.Start运行程序时,无法找到它的资源文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)