使用Windows服务通过vb.net通知用户 [英] Notify a user through vb.net using windows service

查看:111
本文介绍了使用Windows服务通过vb.net通知用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用vb.net 2008和sql 2008,我希望在vb程序未运行时向用户显示一条消息。

我能够显示消息,但这就是Vb程序运行的时候。无论如何在Vb项目未启动或运行时显示消息?我想到了Windows服务,但不知道如何去做。



提前谢谢。

I''m using vb.net 2008 and sql 2008 and I want a message to be displayed to a user when the vb program is not running.
I have been able to display the message, but that''s when the Vb program is running. Is the anyway to display the message when the Vb project is not lauched or run? I thought of Windows Service, but do not not how to go about it.

Thanks in advance.

推荐答案

您不能使用Windows服务来执行此操作,因为服务不会公开用户界面。



用户界面,包括您的通知图标在托盘中,必须由用户模式应用程序提供,通常在用户登录时用完Run键。在您的情况下,您甚至根本不需要Windows服务。此通知应用程序将执行检查并通知用户此应用程序未运行的所有工作。



虽然,我看不清楚为什么你会需要这样的设施......
You can''t use a Windows Service to do this as services do not expose a user interface, ever.

The user interface, including your notification icon in the tray, must be supplied by a user-mode application, usually run out of the Run key when a user logs in. In your case, you wouldn''t even need Windows Service at all. This notification app would do all the work of checking for and notifying the user that this app isn''t running.

Though, I fail to see why you would even need such a facility...


这篇关于使用Windows服务通过vb.net通知用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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