在我的应用程序中,我有一个标签,以HH:mm:ss
显示当前时间。我怎样才能使标签每秒更新一次内容,以便时间实际正确?
答案 0 :(得分:0)
向您的项目添加Timer
。将“间隔”属性设置为1000。然后...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label1.Text = 'Your code
End Sub