netmon.vbp Option Explicit
Public ctr As Integer, first As Boolean
Private Sub cmdExit_Click()
Set frmStart = Nothing
Unload Me
End Sub
Private Sub Form_Load()
ctr = 0
first = True
' track the ctr so timer checks in and then executes '
' ray 05/98 '
End Sub
Private Sub Timer1_Timer()
On Error GoTo error_handler
ctr = ctr + 1
If ctr = 5 Or first Then
ctr = 0
first = False
If Dir$("P:\", vbDirectory) = "" Then
fncActivate
End If
If Dir$("F:\", vbDirectory) = "" Then
fncActivate
End If
If Dir$("H:\", vbDirectory) = "" Then
fncActivate
End If
txtStatus.Text = " Monitoring Network at " & Time & " on " & Date
End If
If Timer1.Interval = 1 Then
' first time in, do not wait '
Timer1.Interval = 60000
End If
Exit Sub
error_handler:
MsgBox (" NetMon -- Unknown Error Occurred!")
fncActivate
End Sub
Private Function fncActivate()
Dim strdummy$, shellvalue
shellvalue = Shell("c:\netmon\netComplain.exe", vbMaximizedFocus)
AppActivate shellvalue
End Function
** -- end of program 1 -- ** netComplain.vbp Option Explicit
Private Sub Form_Load()
Dim strdummy$
strdummy = MsgBox("No Network Connection, call MIS!",_ vbCritical, "Call MIS!!!")
Unload Me
End
End Sub
** -- end of program 2 -- ** |