0
通过点击桌面上的图标,fifa12和模糊游戏运行成功,但通过我的WPF应用程序运行时,同一个game.exe会运行,但是当我开始我的游戏时:快速比赛,在线或LAN游戏加载并且从不启动。游戏在桌面上运行,但没有运行在我的wpf应用程序中。为什么?
我使用下面的代码执行的Game.exe:
proc.UseShellExecute = false;
string direct= new System.IO.FileInfo(@"" + txtLocation.Text + "").Directory.ToString();
proc.WorkingDirectory=direct;
proc.FileName = @"" + txtLocation.Text + "";
proc.CreateNoWindow = true;
proc.Verb = "runas";
proc.RedirectStandardError = true;
proc.RedirectStandardOutput = true;
p1.StartInfo = proc;
p1.Start();
什么是错上面的代码?
你得到任何错误,如果不尝试围绕它添加一个try catch块 – JohnnBlade
不,先生,我没有得到错误... –
你试图删除proc.CreateNoWindow = true;? – Sascha