有没有一种方法可以让后台进程打开用户可见的窗口? [英] Is there a way to have a background process open up a user visible window?

查看:60
本文介绍了有没有一种方法可以让后台进程打开用户可见的窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写仅应使用远程命令启动的网络广播应用程序.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆