且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Windows服务应用程序中添加Windows窗体?

更新时间:2022-12-21 11:16:47

无法向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.