3992.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 26 行
HTML
26 行
<html>
<head>
<title>About NTsvr.OCX.....</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>About NTsvr.OCX.....</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:wangkai@nease.net">Kingkong</a> on July 17, 1998 at 11:30:39:<p>
First,Thanks for you help! <br>But...<p>I do as you said:<p>Private Sub Form_Load()<br> If Command = "-install" Then<br> ' enable interaction with desktop<br> NTService1.Interactive = True<br> NTService1.Install<br> NTService1.ControlsAccepted = svcCtrlPauseContinue<br> NTService1.StartService<br> End<br> ElseIf Command = "-uninstall" Then<br> NTService1.StopService<br> NTService1.Uninstall<br> End<br> End If<p> .......<p>End sub<p>then open "Control panel/service", set my service to "Start". But i get the error message "The service is not responding to the control function." , what's means the message ? <p>In sample code come with the NTsvr.OCX, there is not a "END" sentence after "StartService" : <p>Private Sub Form_Load()<p>On Error GoTo Err_Load<br> Dim strDisplayName As String<br> Dim bStarted As Boolean<br> <br> strDisplayName = NTService1.DisplayName<br> <br> StatusBar.Panels(1).Text = "Loading"<br> <br> If Command = "-install" Then<br> NTService1.Interactive = True<br> If NTService1.Install Then<br> Call NTService1.SaveSetting("Parameters", "TimerInterval", "1000")<br> MsgBox strDisplayName & " installed successfully"<br> Else<br> MsgBox strDisplayName & " failed to install"<br> End If<br> End<br> ElseIf Command = "-uninstall" Then<br> If NTService1.Uninstall Then<br> MsgBox strDisplayName & " uninstalled successfully"<br> Else<br> MsgBox strDisplayName & " failed to uninstall"<br> End If<br> End<br> ElseIf Command = "-debug" Then<br> NTService1.Debug = True<br> ElseIf Command <> "" Then<br> MsgBox "Invalid command option"<br> End<br> End If<br> <br> Timer.Interval = CInt(NTService1.GetSetting("Parameters", "TimerInterval", "2000"))<br> <br> NTService1.ControlsAccepted = svcCtrlPauseContinue<br> NTService1.StartService<br>Err_Load:<br> Call NTService1.LogEvent(svcMessageError, svcEventError, "[" & Err.Number & "] " & Err.Description)<br>End Sub<p><br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 3992-->
<!--top: 4004--><li><a href="4004.html">你又写错了</a> <b>小吴</b> <i>16:20:24 7/17/98</i>
(<!--responses: 4004-->0)
<ul><!--insert: 4004-->
</ul><!--end: 4004-->
</ul><!--end: 3992-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?