如何从Windows服务中打开Windows窗体??? [英] How to open Windows Form from a windows Service???

查看:165
本文介绍了如何从Windows服务中打开Windows窗体???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

请尽快告诉我....如何从Windows服务中打开Windows窗体?
问候..

hi all

Please tell me asap....How to open Windows Form from a windows Service???

Regards..

推荐答案

0)Windows服务没有接口,因此不能具有自己的形式(如果那是您想要的形式).

1)您必须将服务设置为与Windows桌面交互"才能使用GUI打开外部应用程序.然后,我怀疑您还必须确保某个用户(甚至可能是适当的用户)已登录,但是我不太确定该要求.需要注意的另一件事是,如果要这样做,大多数时候,正确的方法是将应用程序放入系统托盘.
0) A Windows service has no interface, and therefore cannot have its own forms (if that''s what you were intending).

1) You have to set the service to "interact with the windows desktop" to open an external app with a GUI. I then suspect that you would also have to make sure that a user (and maybe even the appropriate user) is logged in, but I''m not entirely sure about that requirement. Another thing to be aware of is that if you want to do that, MOST of the time, the proper method is to put the app into the system tray.


这篇关于如何从Windows服务中打开Windows窗体???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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