Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim m As Integer, d As Integer, min As Integer, s As Integer, h As Integer min = 59 - DateTime.Now.Minute() s = 59 - DateTime.Now.Second() h = 23 - DateTime.Now.Hour() m = 12 - Month(Today()) If m = 1 Then d = d + 30 - DateTime.Today.Day() + 22 Else d = 22 - DateTime.Today.Day() End If Label1.Text = "现在离英语四级考试还有" + Format(d, "00") + "天" + Format(h, "00") + "小时" + Format(min, "00") + "分钟" + Format(s, "00") + "秒。" End Sub 关于英语四级的倒计时,想了好久终于写出来了。 |
VB.NET公共场合倒计时牌程序
最新推荐文章于 2022-08-09 22:50:47 发布