by Esteban Mackay D. (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 19th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Make the object Timer in runtime and checking intervals time independently. Add one timer control and 4 button 4 label to a form
Dim aNum(0 To 4) As Integer
'EMD Productions 2002(c)
'Make the object timer in runtime and checking
'intervals time independently.
'Add one timer control and 4 button, 4 label
'Tiempo=Timer control
'**********************************************
Private Sub cmdTiempo_Click(Index As Integer)
If cmdTiempo(Index).Caption = "Start" Then
lblTotal(Index).Caption = 0
aNum(Index) = 1
cmdTiempo(Index).Caption = "Stop"
Tiempo(Index).Enabled = True
Else
Tiempo(Index).Enabled = False
cmdTiempo(Index).Caption = "Start"
End If
End Sub
Private Sub Form_Load()
'Make timer controls on runtime
Dim cObjetos As Integer
Dim cObj As Integer
For cObj = 1 To cmdTiempo.Count - 1
Load Tiempo(cObj)
Next cObj
End Sub
Private Sub lblTotal_Change(Index As Integer)
'Stop timer about index
If lblTotal(Index).Caption = 10 Then
Beep
cmdTiempo(Index).Caption = "Start"
Tiempo(Index).Enabled = False
End If
End Sub
Private Sub Tiempo_Timer(Index As Integer)
lblTotal(Index).Caption = aNum(Index)
aNum(Index) = aNum(Index) + 1
End Sub
No comments have been posted about Make the object Timer in runtime and checking intervals time independently. Add one timer control a. Why not be the first to post a comment about Make the object Timer in runtime and checking intervals time independently. Add one timer control a.