Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 运行我自己编写的应用程序不会';不显示在任务栏中_C#_Forms_Silverlight_Visual Studio Lightswitch - Fatal编程技术网

C# 运行我自己编写的应用程序不会';不显示在任务栏中

C# 运行我自己编写的应用程序不会';不显示在任务栏中,c#,forms,silverlight,visual-studio-lightswitch,C#,Forms,Silverlight,Visual Studio Lightswitch,我有一个应用程序是用 我还有另一个应用程序,它使用的是Windows窗体 当我使用此代码调用其他应用程序时 if (Microsoft.LightSwitch.Runtime.Shell.Implementation.App.Current.HasElevatedPermissions) { using (dynamic cmd = AutomationFactory.CreateObject("Shell.Application"))

我有一个应用程序是用 我还有另一个应用程序,它使用的是
Windows窗体

当我使用此代码调用其他应用程序时

  if (Microsoft.LightSwitch.Runtime.Shell.Implementation.App.Current.HasElevatedPermissions)
            {
                using (dynamic cmd = AutomationFactory.CreateObject("Shell.Application"))
                {
                    cmd.ShellExecute("X:\\Nima\\Application Files\\NimaLogin.exe", 1, true);
                }
            }
另一个应用程序(
NimaLogin.exe
)没有显示在任务栏中,但我可以在进程列表中看到它

但是当我从VisualStudio手动运行另一个应用程序时,一切都很好,我可以看到应用程序本身

p、 s我尝试了
run
而不是
ShellExecute
,但我遇到了一个错误

编辑:这将导致
NimaLogin.exe
在进程列表中“卡住”