Timer1 on visual basic default max is 60000 = 60 second or 1 minutes, to make Timer over 60 second on VB6 Follow This Step :
'--------------Start Code
Dim timeOut As Integer
Private Sub Form_Load()
Show
Timer1.Interval = 60000
timeOut = 1 'Change timeOut to '60'= 60 minutes.
End Sub
Sub Timer1_Timer()
Static TimerTimes As Integer
TimerTimes = TimerTimes + 1
If TimerTimes = timeOut Then
TimerTimes = 0
Print " Timer has completed " & Timer1.Interval / 60000 * timeOut & " minutes"
Timer1.Enabled = False
Else
Exit Sub
End If
End Sub
'--------------Finish Code
Change the variable ('timeOut') to '60' and she'll clock for roughly 60 minutes.
0 comments:
Posting Komentar