vb.net中动态显示时间
就是在一个lable中显示电脑的时间并且随其改变。PrivateSubMain_Load(ByValsenderAsSystem.Object,ByValeAsSyste...
就是在一个lable中显示电脑的时间并且随其改变。
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Show()
Timer.Enabled = True
Timer.Interval = 1000
timer_Tick()
Dim Login As New Login()
Login.ShowDialog()
End Sub
Private Sub timer_Tick()
timeToolStripStatusLabel.Text = Now().ToString("hh:MM:ss")
End Sub
这样为什么不行? 展开
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Show()
Timer.Enabled = True
Timer.Interval = 1000
timer_Tick()
Dim Login As New Login()
Login.ShowDialog()
End Sub
Private Sub timer_Tick()
timeToolStripStatusLabel.Text = Now().ToString("hh:MM:ss")
End Sub
这样为什么不行? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询