|
Private Sub Form_Timer()
m_LII.cbSize = Len(m_LII)
GetLastInputInfo m_LII
If (GetTickCount() - m_LII.dwTime) \ 60000 = Me.txtSeconds Then
If Me.fraOperateType = Me.optLock.OptionValue Then
DoCmd.OpenForm "frmLockSystem"
Else
DoCmd.OpenForm "frmQuitCountdown", OpenArgs:="QuitSystem"
End If
Else
On Error Resume Next
DoCmd.Close acForm, "frmQuitCountdown"
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Me.TimerInterval = 0
End Sub
Private Sub txtSeconds_AfterUpdate()
If Nz(Me.txtSeconds, 0) <= 0 Then
Me.txtSeconds = 0
Me.TimerInterval = 0
End If
If Me.txtSeconds > 60 Then
Me.txtSeconds = 60
Else
Me.txtSeconds = Int(Me.txtSeconds)
End If
End Sub
--------------------------------------------------------------- |
|