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
---------------------------------------------------------------作者: tmtony 时间: 2014-11-3 21:45
If (GetTickCount() - m_LII.dwTime) \ 60000 = Me.txtSeconds Then
改为
If (GetTickCount() - m_LII.dwTime) \ 60000 = 5 Then作者: andySI 时间: 2014-11-4 10:57
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