小编San*_*ana的帖子

在wpf应用程序中使用process.start来调用另一个wpf应用程序

我试图从另一个wpf应用程序调用一个wpf应用程序.调用wpf应用程序进行调用

ProcessStartInfo BOM = new ProcessStartInfo();

BOM.FileName = @"D:\WPFAPPLICATION.exe";

BOM.Arguments = temp;

Process.Start(BOM);
Run Code Online (Sandbox Code Playgroud)

现在在调用的应用程序中,我尝试检索传递的参数

  string arguments =Process.GetCurrentProcess().StartInfo.Arguments;
Run Code Online (Sandbox Code Playgroud)

但是参数没有通过.为什么是这样??

我还尝试了一种替代方法,其中:

    public partial class App : Application
    {
    public static String[] mArgs;

    private void Application_Startup(object sender, StartupEventArgs e)
    {

        if (e.Args.Length > 0)
        {
            mArgs = e.Args;


        }
    }
    }
    }
Run Code Online (Sandbox Code Playgroud)

然而,这也不起作用!请帮忙!!

c# wpf process calling-convention argument-passing

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

标签 统计

argument-passing ×1

c# ×1

calling-convention ×1

process ×1

wpf ×1