vb.net多计时器秒表

时间:2016-04-05 11:22:50

标签: vb.net timer

Datagridview将如何生成一个计时器以适合每个想要在线上显示时间的行?

如何单击按钮创建计时器以计算下一个低点的剩余时间? 应该创建每个计时器。适合排 不断做倒计时。 动态timer_tick如何制作几个?

enter image description here

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    TimerCount = DataGridView2.RowCount - 1

    Dim tmrTimeNew(TimerCount) As Timer
    tmrTimeNew(TimerCount) = New Timer
    tmrTimeNew(TimerCount).Interval = 1000
    tmrTimeNew(TimerCount).Enabled = True
    AddHandler tmrTimeNew(TimerCount)???.Tick, AddressOf tmrTimeNew_Tick2

End Sub

Private Sub **tmrTimeNew_Tick(TimerCount)???**(ByVal sender As Object, ByVal e As System.EventArgs)

    'MsgBox(TimerCount)
    '현재시간 라벨에 보여주기
    With DataGridView2
        .Rows(TimerCount).Cells(0).Value = TimerCount & " saniye"
    End With


End Sub

0 个答案:

没有答案