相关疑难解决方法(0)

如何启动进程隐藏?

我通过ProcessStartInfo和process.Start()启动控制台应用程序.我想隐藏黑色的窗户.这是我的代码:

string output = "";
//Setup the Process with the ProcessStartInfo class
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "C:\\WINNT\\system32\\cmd.exe";
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;

//Start the process
Process proc = Process.Start(startInfo);
Run Code Online (Sandbox Code Playgroud)

c# process

20
推荐指数
4
解决办法
5万
查看次数

2019 年 .NET Core 的 XSLT3 选项

2019 年有人在 .NET Core 2.x+ 中进行了 XSLT3 转换吗?

似乎向 MS 提供XSLT2/3 支持的请求还没有进展,而 Saxon 人还有其他优先事项,特别是考虑到IKVM 关闭

进程内 XSLT 转换还有其他替代方案吗?目前,我唯一的选择似乎是通过外部服务或一些不受欢迎的(对我们而言)COM 风格的方法来包装某些内容,这将涉及大量数据编组,从而损害性能。

saxon xslt-3.0 .net-core

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

C#,Process.Start隐藏?

public static void Main(string[] args){
    SearchGoogle("Test");
    Console.ReadKey(true);
}

static void SearchGoogle(string t){
    Process.Start("http://google.com/search?q=" + t);
}
Run Code Online (Sandbox Code Playgroud)

有没有办法隐藏浏览器,所以它不会弹出?

c# process

4
推荐指数
3
解决办法
2万
查看次数

WPF检查系统上是否安装了python

我的wpf应用程序调用python脚本来生成输出,稍后会在UI中显示该输出.如果在用户系统上没有安装python,为了避免应用程序崩溃,我需要执行检查.目前我使用以下方法实现了这一目标

ProcessStartInfo start = new ProcessStartInfo();
start.FileName = @"cmd.exe"; // Specify exe name.
start.Arguments = "python --version";
start.UseShellExecute = false;
start.RedirectStandardError = true;

using (Process process = Process.Start(start))
        {
            using (StreamReader reader = process.StandardError)
            {
                string result = reader.ReadToEnd();
                MessageBox.Show(result);
            }
        }
Run Code Online (Sandbox Code Playgroud)

这样可以完成工作,但会导致cmd黑色窗口的瞬间出现,这是非常不希望的.有没有解决方法来实现这个或修复以避免窗口的外观?

c# python wpf cmd

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

标签 统计

c# ×3

process ×2

.net-core ×1

cmd ×1

python ×1

saxon ×1

wpf ×1

xslt-3.0 ×1