有没有一种方法可以让后台进程打开用户可见的窗口? [英] Is there a way to have a background process open up a user visible window?
问题描述
我正在编写仅应使用远程命令启动的网络广播应用程序.
I'm writing a network broadcasting application that's only supposed to start up on remote command.
我从带有侦听器的Windows服务开始,该服务会打开winform,但很快意识到这不再起作用,因为出于某种安全原因,服务只能在会话#0之外的任何情况下都不能更改UI.
I started with a windows service with a listener that would open up a winform, but quickly realized that that doesn't work anymore because services can no longer change UI in anything but session #0 for some sort of security reasons.
我的下一个想法是使用系统任务栏应用程序而不是Windows服务.在我走这条路之前,有没有更好的方法?系统托盘中没有任何功能的图标看起来很虚弱,尽管我认为不可见的进程会带来安全问题.
My next idea was to have a system tray application instead of a windows service. Before I start down this path, is there a better way? An icon in the system tray that has no functionality seems inane, although I suppose there would be security problems that would come along with invisible processes.
tl; dr是否有一种方法可以使某种类型的后台进程打开用户可见的窗口?
tl;dr Is there a way to have some type of background process open up a user visible window?
推荐答案
否!*
.
.
*至少不与新版本的Windows兼容
*at least not while being compatible with newer versions of windows
Edit2:我最终使用了系统任务栏应用程序方法,并且效果很好
I ended up going with the system tray app approach, and it worked just fine
这篇关于有没有一种方法可以让后台进程打开用户可见的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!