运行用户界面与Windows服务 [英] running UI with windows service

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

问题描述

我计划运行启动/监视使用Windows服务(用C#编写)的UI应用程序,与允许服务与桌面交互检查。这工作正常的Windows XP,但与Windows 7弹出如下图所示。

i am planning to run a launch/monitor a UI application using a windows service(written in C#).with "Allow service to interact with desktop " checked. this works fine with windows xp, but with windows 7 a pop is shown as below

,当我在视图中单击邮件,然后屏幕空白整出来的,只有用户界面显示出来,如下图所示。

and when i click on view the message , then the whole screen blanks out,with only UI showing up ,as shown below.

有没有什么办法让它不被显示的信息和屏幕将空白的工作。

is there any way to make it work without the message being shown and screen going blank.

意见/建议AP preciated。

comments/suggestions appreciated.

问候 DEE

推荐答案

允许服务与桌面交互是现在非常鼓励一个传统的选项,虽然它的存在,预计不会在Windows Vista及以上工作

"Allow service to interact with desktop " is a legacy option that is now highly discouraged, and although it exists, is not expected to work in Windows Vista and upwards.

您需要阅读了一下这是为什么在这个其他SO如是回答:
<一href="http://stackoverflow.com/questions/4237225/windows-service-allow-service-to-interact-with-desktop">windows服务(允许服务与桌面交互)

You need to read a bit on why this is the case in this other SO answer:
windows service (allow service to interact with desktop)

然后寻找在这里回答讨论的备选方案:
<一href="http://stackoverflow.com/questions/2345620/alternative-to-allow-service-to-interact-with-desktop">Alternative到&QUOT;允许服务与桌面&QUOT;?

Then look for the alternatives discussed in the answer here:
Alternative to "Allow service to interact with desktop"?

另一个讨论外SO:
<一href="http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/f8f91e8f-5954-43a7-8bc4-80ed2ff1e3b1/" rel="nofollow">http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/f8f91e8f-5954-43a7-8bc4-80ed2ff1e3b1/

Another discussion outside SO:
http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/f8f91e8f-5954-43a7-8bc4-80ed2ff1e3b1/

这篇关于运行用户界面与Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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