100165811.htm

来自「C#高级编程(第三版),顶死你们。。 。up」· HTM 代码 · 共 98 行

HTM
98
字号


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	
        32.6.1  交互式服务
</title></head>
<body>
    <div class="area">

        

        <div class="col1">
            <div class="lineBlue">
            </div>
            <!-- title -->
            <div class="arcTitle">
                <h1>
                    <a href="../16">
                        C#高级编程(第3版)【全文连载】
                    </a>
                </h1>
                <div style="text-align: center; font-size: 15px">
                    <a href="100165811.htm">
                        32.6.1  交互式服务
                    </a>
                </div>
                <div style="text-align: center; font-size: 15px">
                    <a class="url" href="../../default.htm">http://book.csdn.net/</a>
                    2006-10-13 14:41:00
                </div>
                <div style="margin: 0px auto; width: 700px; border: solid 1px #0b5f98;">
                    <div style="float: left; width: 16px; background-color: #0b5f98; color: White; padding: 1px;">
                        图书导读
                    </div>
                    <div style="float: right; width: 670px; text-align: left; line-height: 16pt; padding-left: 2px">
                        <!--导读-->
                        <h1 id="divCurrentNode" style="color: #b83507; width: 100%; text-align: left; font-size: 12px; padding-left: 2px">当前章节:<a href='100165811.htm'><font color='red'>32.6.1  交互式服务</font></a></h1>
                        <div id="divRelateNode" style="padding-left: 2px">
                        <div style='float:left;width:49%'>·<a href='100165808.htm'>32.5.4  Visual Studio .NET Server Explorer</a></div><div style='float:right;width:49%'>·<a href='100165809.htm'>32.5.5  ServiceController类</a></div><div style='float:left;width:49%'>·<a href='100165810.htm'>32.6  故障排除</a></div><div style='float:right;width:49%'>·<a href='100165812.htm'>32.6.2  事件日志</a></div><div style='float:left;width:49%'>·<a href='100165813.htm'>32.6.3  性能监视</a></div><div style='float:right;width:49%'>·<a href='100165814.htm'>32.7  电源事件</a></div></div>
                    </div>
                </div>
                </div>
            <!-- main -->
            <div id="main">
                <div id="text"> <link href="css.css" rel="stylesheet" type="text/css" /><h3 style='margin-top:8.15pt;margin-right:0cm;FTEL:8.15pt;margin-left:
0cm'><a FTEL="_Toc507815590"><span lang=EN-US>32.6.1&nbsp; </span></a><span
style='font-family:黑体'>交互式服务</span></h3>

<p class=MsoNormal><span style='font-family:宋体'>如果交互式服务运行在已登录的用户账户下,把消息框显示出来是非常有用的。如果服务运行在锁在计算机机房中的服务器上,就不用显示消息框。在打开消息框,等待用户的输入时,由于计算机房间中没有人理会服务器,因此用户的输入许多天都不会发生;更糟糕的是,如果服务没有配置为交互式的服务,则消息框就会在另一个隐藏的窗口中打开,这样,没有人可以响应那个隐藏的消息框,因此,服务将一直处于停滞状态。</span></p>



<p class=a3 style='margin-top:8.15pt;FTEL:21.45pt'><span
style='font-family:黑体'>注意:</span></p>

<p class=a1 style='FTEL:8.15pt;FTEL:21.45pt'><span
style='font-family:楷体_GB2312'>不要为运行在服务器系统上的服务打开对话框,因为没有人响应这个对话框。</span></p>

<p class=MsoNormal><span style='font-family:宋体'>如果要与用户交互,可以配置一个交互式的服务。例如,用于向用户显示纸张输出信息的</span><span
lang=EN-US>Print Spooler</span><span style='font-family:宋体'>服务和</span><span
lang=EN-US>NetMeeting Remote Desktop Sharing</span><span style='font-family:
宋体'>服务就是交互式的服务。</span></p>

<p class=MsoNormal><span style='font-family:宋体'>在配置交互式服务时,必须设置</span><span
lang=EN-US>Services</span><span style='font-family:宋体'>配置工具中的</span><span
lang=EN-US>Allow service to interact with desktop</span><span style='font-family:
宋体'>选项,如图</span><span lang=EN-US>32-20</span><span style='font-family:宋体'>所示。把</span><span
lang=EN-US>SERVICE_INTERACTIVE_PROCESS</span><span style='font-family:宋体'>标记添加给类型,可以改变服务的类型。</span></p>

<p align=center><span lang=EN-US><img width=279 height=317
src="32/image021.jpg"></span></p>

<p align=center style='FTEL:8.15pt'><span style='font-family:宋体;color:black'>图</span><span
lang=EN-US style='color:black'>&nbsp; 32-20</span></p>

</div>
                <!-- page -->
                <div class="page" style="text-align: center">
                    <a href="100165810.htm">上一页</a>&nbsp;&nbsp;&nbsp;<a href="index.html">首页</a>&nbsp;&nbsp;&nbsp;<a href="100165812.htm">下一页</a>
                </div>
                <div style="margin: 0px auto; width: 700px; border: solid 1px #0b5f98;">
                    <div style="float: left; width: 16px; background-color: #0b5f98; color: White; padding: 1px;">
                        图书导读
                    </div>
                    <div style="float: right; width: 670px; text-align: left; line-height: 16pt; padding-left: 2px">
                        <!--导读-->
                        <h1 id="divCurrentNode2" style="color: #b83507; width: 100%; text-align: left; font-size: 12px; padding-left: 2px">当前章节:<a href='100165811.htm'><font color='red'>32.6.1  交互式服务</font></a></h1>
                        <div id="divRealteNod2" style="padding-left: 2px">
                        <div style='float:left;width:49%'>·<a href='100165808.htm'>32.5.4  Visual Studio .NET Server Explorer</a></div><div style='float:right;width:49%'>·<a href='100165809.htm'>32.5.5  ServiceController类</a></div><div style='float:left;width:49%'>·<a href='100165810.htm'>32.6  故障排除</a></div><div style='float:right;width:49%'>·<a href='100165812.htm'>32.6.2  事件日志</a></div><div style='float:left;width:49%'>·<a href='100165813.htm'>32.6.3  性能监视</a></div><div style='float:right;width:49%'>·<a href='100165814.htm'>32.7  电源事件</a></div></div>
                    </div>
                </div>
                </div>
        </div>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?