-3
如何使一分钟或使labeltime.text前景色红色倒计时警告
Private Sub tmrCountdown_Tick(sender As System.Object, e As System.EventArgs) Handles tmrCountdown.Tick
Dim ts As TimeSpan = TargetDT.Subtract(DateTime.Now)
If ts.TotalMilliseconds > 0 Then
lblTime.Text = ts.ToString("mm\:ss")
Else
lblTime.Text = "00:00"
tmrCountdown.Stop()
MessageBox.Show("Times Up")
Me.Close()
End If
End Sub
你提的问题是非常不清楚。请编辑并尝试澄清你的意思。 –
我的意思是如果定时器只有一分钟就会发出警告 –
检查'Math.Floor(ts.TotalSeconds)'是否是60? –