我将如何使用以下数据创建 mm:ss 格式的倒计时:
Dim secCount As String = 0
Dim button1 As Decimal
Private Sub button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button.Click
button1 = InputBox("Set button1 for how many minutes?", "button1", "5")
If Timer1.Enabled = True Then
Timer1.Enabled = False
Else
secCount = 60
Timer1.Interval = 1000
Timer1.Enabled = True
Timer1.Start()
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim mincount As String = button1
secCount = secCount - 1
If secCount = "-1" Then
secCount = "59"
End If
If mincount = button1 Then
secCount = secCount.PadLeft(2, "0"c)
Label6.Text = (mincount + ":" + secCount)
If secCount = button1 Then
MsgBox("button1")
End If
End Sub
标签正在倒计时 mm:ss 我正在尝试让 mincount 和 seccount 工作,但目前只有 seccount 可以工作