我將如何創建格式爲mm倒計時:用以下數據SS:創建倒計時(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 我試圖讓短期和短期工作,但目前只有seccount將工作
沒關係問題解決了。謝謝你的建議 –
解決了,怎麼樣?這可以幫助其他人。 – usr2564301
@OliverHands:如果您的問題現在已解決,並且此答案有助於解決問題,請考慮接受和/或加註此答案。如果你必須自己做一些研究,你可以把它作爲一個單獨的答案發布。 SO的一個常見做法是將任何人試圖幫助你的信譽歸功於此。因此,如果您使用上述答案來提出解決方案,請考慮接受和/或提升解決方案,儘管它可能沒有完全解決您的問題。 – Neolisk