發現程式有矛盾
改成
語法:
Dim StartDate As Date
Dim StartSecond As Long
Private Sub Form_Load()
StartDate = Date
StartSecond = Timer
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Dim NowSecond As Long
NowSecond = (Date - StartDate) * 86400 + Timer
If NowSecond - StartSecond >= 120 Then
' MsgBox "2分鐘了"
Me.WindowState = 0
StartDate = Date
StartSecond = Timer
End If
End Sub