home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / svcitocx / admin.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-08-25  |  3.4 KB  |  121 lines

  1. VERSION 5.00
  2. Object = "{5DA62B65-0D48-11D2-A6E3-00400541EFEE}#1.0#0"; "SvcIt.ocx"
  3. Begin VB.Form Admin 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Service Admin"
  6.    ClientHeight    =   1695
  7.    ClientLeft      =   150
  8.    ClientTop       =   435
  9.    ClientWidth     =   3255
  10.    LinkTopic       =   "Form2"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1695
  14.    ScaleWidth      =   3255
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CommandButton CmdContinue 
  18.       Caption         =   "Continue"
  19.       Height          =   315
  20.       Left            =   2040
  21.       TabIndex        =   6
  22.       Top             =   1320
  23.       Width           =   1065
  24.    End
  25.    Begin VB.CommandButton CmdStart 
  26.       Caption         =   "Start"
  27.       Height          =   315
  28.       Left            =   2040
  29.       TabIndex        =   5
  30.       Top             =   150
  31.       Width           =   1065
  32.    End
  33.    Begin VB.CommandButton CmdStop 
  34.       Caption         =   "Stop"
  35.       Height          =   315
  36.       Left            =   2040
  37.       TabIndex        =   4
  38.       Top             =   540
  39.       Width           =   1065
  40.    End
  41.    Begin VB.CommandButton CmdPause 
  42.       Caption         =   "Pause"
  43.       Height          =   315
  44.       Left            =   2040
  45.       TabIndex        =   3
  46.       Top             =   930
  47.       Width           =   1065
  48.    End
  49.    Begin VB.CommandButton CmdRemove 
  50.       Caption         =   "Remove"
  51.       Height          =   315
  52.       Left            =   780
  53.       TabIndex        =   2
  54.       Top             =   540
  55.       Width           =   1065
  56.    End
  57.    Begin VB.CommandButton CmdInstall 
  58.       Caption         =   "Install"
  59.       Height          =   315
  60.       Left            =   780
  61.       TabIndex        =   1
  62.       Top             =   150
  63.       Width           =   1065
  64.    End
  65.    Begin SVCITLib.SvcIt MyService 
  66.       Height          =   480
  67.       Left            =   180
  68.       TabIndex        =   0
  69.       Top             =   180
  70.       Width           =   480
  71.       _Version        =   65536
  72.       _ExtentX        =   847
  73.       _ExtentY        =   847
  74.       _StockProps     =   0
  75.       ServiceName     =   "BeepService"
  76.       DisplayName     =   "Service-It Sample Beep Service"
  77.       Dependencies    =   "LanmanWorkstation"
  78.       MachineName     =   ""
  79.       ServiceExe      =   ""
  80.       Mode            =   2
  81.    End
  82. Attribute VB_Name = "Admin"
  83. Attribute VB_GlobalNameSpace = False
  84. Attribute VB_Creatable = False
  85. Attribute VB_PredeclaredId = True
  86. Attribute VB_Exposed = False
  87. Option Explicit
  88. Private Sub CmdContinue_Click()
  89.   If MyService.IsPaused Then
  90.     MyService.Continue
  91.   End If
  92. End Sub
  93. Private Sub CmdInstall_Click()
  94.   If MyService.IsInstalled Then
  95.     ' Remove previous service entry
  96.     MyService.Remove
  97.   End If
  98.   ' Install and start the service
  99.   MyService.Install True
  100. End Sub
  101. Private Sub CmdPause_Click()
  102.   If MyService.IsRunning Then
  103.     MyService.Pause
  104.   End If
  105. End Sub
  106. Private Sub CmdRemove_Click()
  107.   If MyService.IsInstalled Then
  108.     MyService.Remove
  109.   End If
  110. End Sub
  111. Private Sub CmdStart_Click()
  112.   MyService.Start ("")
  113. End Sub
  114. Private Sub CmdStop_Click()
  115.   If MyService.IsRunning Or MyService.IsPaused Then
  116.     MyService.Stop
  117.   End If
  118. End Sub
  119. Private Sub Command1_Click()
  120. End Sub
  121.