用VB设计一个倒计时器,能够设置倒计时的时间,并进行倒计时

发布于2022-05-28 09:03:33
1个回答
admin
网友回答2022-05-28
Option Explicit Dim SetTime As Integer Private Sub Command1_Click() Timer1.Interval = 1000 SetTime = CInt(Text1) Timer1.Enabled = True End Sub Private Sub Timer1_Timer() SetTime = SetTime - 1 If SetTime = 0 Then MsgBox "时间到" End If End Sub text1里面输入倒计时时间(秒),command1开始倒计时

回到
顶部