小编Bob*_* T.的帖子

希望C#程序启动WPF应用程序

我发现需要从ac#program中启动一个WPF应用程序.我编写了一个名为eBrowse的简单WPF浏览器作为练习.然后,我被要求将它添加到已经在使用的ac#程序中.

我试过System.Diagnostics.Process.Start(@"C:\eBrowse");但它没用.

在网站上发现的另一种可能性:

myProcess.StartInfo.UseShellExecute = true;
// You can start any process, HelloWorld is a do-nothing example.
//myProcess.StartInfo.FileName = "C:\\HelloWorld.exe";
myProcess.StartInfo.FileName = @"C:\eBrowse";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
// This code assumes the process you are starting will terminate itself. 
// Given that is is started without a window so you cannot terminate it 
// on the desktop, it must terminate itself or you can do it programmatically
// from this application using the Kill method.
Run Code Online (Sandbox Code Playgroud)

我想知道是否可能无法从c#启动WPF应用程序.任何想法都会很棒.

c# wpf

1
推荐指数
1
解决办法
2537
查看次数

标签 统计

c# ×1

wpf ×1