这个服务为什么不能启动程序?
hzybc 2007-11-06 12:12:35 Public Class Service1
Dim xN As Integer
Protected Overrides Sub OnStart(ByVal args() As String)
' 请在此处添加代码以启动您的服务。此方法应完成设置工作,
' 以使您的服务开始工作。
Timer1.Enabled = True
End Sub
Protected Overrides Sub OnStop()
' 在此处添加代码以执行任何必要的拆解操作,从而停止您的服务。
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If xN < 3 Then
xN = xN + 1
Shell("C:\Calc.exe", AppWinStyle.NormalFocus)
Else
Timer1.Enabled = False
End If
End Sub
End Class
'--------------------------
服务已经成功注册,可随系统启动