Windows服务中的消息框 [英] Message box in windows services

查看:62
本文介绍了Windows服务中的消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要Windows服务中的消息或通知,例如文件已删除".我该如何处理呢?

I want Message or notification in windows service, like "files are deleted." How can I handle this one?

推荐答案

您不能在Windows服务程序中使用消息框.如果您希望将状态信息发布给用户,则必须创建一个独立的应用程序,该应用程序将轮询服务程序,或将信息发送到事件日志.
you cannot use message boxes in Windows service programs. If you wish to post status information to the user you must create a free-standing application that will poll the service program, or send information to the event logs.


如果我没有记错的话,您将需要为此解决一些问题.

看看下面的链接.

http://social.msdn.microsoft.com/Forums/zh_CN/csharpgeneral/thread/1f59286d-5630-4175-b73d-ee993607beb1
If I am not wrong, you will have to do some work-around solution for this.

Have a look at below link.

http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/1f59286d-5630-4175-b73d-ee993607beb1


这篇关于Windows服务中的消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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