PCPT
Messages postés13272Date d'inscriptionlundi 13 décembre 2004StatutMembreDernière intervention 3 février 201847 26 nov. 2005 à 22:43
salut,
le timer VB est en Integer, donc 65535 max.
2 méthodes :
1ère, la plus simple, utiliser mon AfTimer qui est en interval Long (donc 2milliards....)
2ème, permet de ne pas avoir de contrôle à ajouter, tu utilises ton timer comme un compteur interne.
donc intervalle autorisé, et quand il a fait X évènements, tu fais ton action
[VB6]
Option Explicit
'
'
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 11300 'i minute
Command1.Caption = "démarrer le timer"
End Sub
'
'
Private Sub Command1_Click()
Timer1.Enabled = True
Command1.Enabled = False
End Sub
'
'
Private Sub Timer1_Timer()
' temps à attendre : 226000ms
Static lCpt As Long
lCpt = lCpt + 1
If lCpt = 20 Then 'atteind
Timer1.Enabled = False
lCpt = 0
'ta fonction....
Debug.Print "enfin !!!"
End If
End Sub