如何在Windows服务应用程序中添加Windows窗体? [英] How do I add Windows Form in windows service application?

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

问题描述

Hello Gentleman's!





实际上,我已经创建了Windows Form应用程序,我必须在后台启动该应用程序运行像任务调度程序(不要告诉把你的应用程序启动)hehe ... /如何在Window服务中添加Windows窗体应用程序。这将显示一个Window窗体应用程序。通常,Windows服务文件没有UI。但我想将Windows窗体应用程序添加到Windows服务...





可能吗?



C#

Hello Gentleman's!


Actually, I have created Windows Form application, which i have to start that application in background its just runs like Task scheduler (Don't tell that "Put your application on startup") hehe... / how do i add windows form application in Window service. that will show a Window form application. Usually, Windows service file doesn't have UI. but i want to add Windows Form App to Windows Service...


Is it Possible??

C#

推荐答案

无法向Windows服务添加UI。我参与了一些项目,我们实施了几十个呈现其状态的Windows服务和UI。这些是两个不同的应用程序,它们使用不同的协议相互通信。我们使用套接字,文件等进行通信。现在,进行此通信的最方便有效的方法是WCF。您可以定义API并使用它们进行通信,一旦建立完整的基础架构,您就会对使用一个应用程序感到满意。
There is no way to add UI to Windows Service. I participated in projects where we implemented dozens of Windows Services and UI that presents their status. Always these are two different applications that communicate with each other using different protocols. We communicated using sockets, files, etc. Right now the most convenient and efficient way to do this communication is WCF. You define API and communicate using them, once you establish whole infrastructure you'll have feelings that you work with one application.


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

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