如图
现在要求程序运行时,如何让该界面实现实时倒数。比如上面的38秒、37秒、36秒以此类推!
如图
现在要求程序运行时,如何让该界面实现实时倒数。比如上面的38秒、37秒、36秒以此类推!
Dim a, b, c As Integer
Private Sub Form_Load()
a = Hour(Now())
b = Minute(Now())
c = Second(Now())
Timer1.Interval = 1000
Label1.Caption = "离关机时间还剩下" & a & ":" & b & ":" & c & "秒"
End Sub
Private Sub Timer1_Timer()
c = c - 1
Label1.Caption = "离关机时间还剩下" & a & ":" & b & ":" & c & "秒"
If c = 0 Then c = 59: b = b - 1
If b = 0 Then a = a - 1: b = 59
If a = 0 And b = 0 And c = 0 Then a = 23: b = 59: c = 59
End Sub
不回一个timer1和label1