c# - 运行从 C# 应用程序最小化的 Metro 应用程序

标签 c# process windows-10-universal

对于非 Metro 应用程序,ProcessStartInfo.WindowStyle 可用于最小化运行应用程序:

ProcessStartInfo processStartInfo = new ProcessStartInfo("notepad.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(processStartInfo);

也可以使用 Kernel32.CreateProcess .

但是,对于 Metro 应用程序,窗口样式方法不起作用:

ProcessStartInfo processStartInfo = new ProcessStartInfo("microsoft-edge://");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(processStartInfo);

CreateProcess 是 only applicable for non-metro apps .

有没有办法最小化运行 Metro 应用程序? (注意,这不同于运行 metro 应用程序,获取窗口句柄,然后最小化窗口)

最佳答案

不幸的是,目前似乎不支持将 UWP 应用程序最小化到系统托盘中。如果你确实想要这个功能,你可以通过投票来帮助实现 UWP System tray support.

关于c# - 运行从 C# 应用程序最小化的 Metro 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44877464/

相关文章:

c# - 为什么 BluetoothLEDevice.GattServices 为空

c# - 将值 UserControl 传递给 View Page 的 ViewModel

c# - 返回到代码块的开头?

c# - 如何在 Windows Phone 8 应用程序中检查互联网连接可用性

c# - 在没有 TransactionScopeAsyncFlowOption.Enabled 的情况下启用异步 TransactionScope

c# - 如何将 ctrl+c 发送到 C# 中的进程?

ruby - 你如何终止 Ruby 中的 PTY.spawn 调用?

.net - Windows 10 通用应用程序中的证书固定

c# - 如何使用隐藏代码合并列中的单元格?

调用我调用一个函数来自动重置?