如何在Winservices应用程序中显示消息框 [英] How to dispaly messagebox in winservices applications

查看:68
本文介绍了如何在Winservices应用程序中显示消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请帮助我在vb.net中创建的WinServices应用程序中显示MessageBox.
并且该messageBox包含从数据库检索的值.


谢谢,
parshu

Hi,

please help me to display MessageBox in WinServices applications which is created in vb.net.
and that messageBox contains the values which are retrived from Database.


Thanks,
parshu

推荐答案

在服务应用程序中显示GUI并不是一件好事.

由于可以在没有任何用户登录消息框(或任何其他GUI)的情况下运行服务,因此永远不会可见.
在服务中进一步显示消息框将有效地阻止服务运行,直到有人单击确定"按钮为止.

为什么要这样做?

您不能将输出写到日志文件吗?
It''s not a good thing to show a GUI in a service application.

Since a service could be running without any user logged in the messagebox (or any other GUI) would never be visible.
Further showing a messagebox in a service will effectively stop the service from running untill somebody clicks on the OK button.

Why do you want to do this?

Can''t you write the output out to a log file?


这篇关于如何在Winservices应用程序中显示消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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