¿ Qué os recuerda ?. Es algo que usamos a veces mucho.
Código:
' gambas class file
Private x As Integer
Private y As Integer
Private cuentatotal As Integer
Const limite As Integer = 30
Public Sub Form_Open()
ProgressBar1.Value = 0
ProgressBar2.Value = 0
Timer1.Delay = 400
Timer2.Delay = 400
Timer1.Start
End
Public Sub Timer1_Timer()
x += 1
ProgressBar1.Value += 10 / limite
Timer1.stop
Timer2.Start
ProgressBar2.Value = 0
End
Public Sub Timer2_Timer()
If cuentatotal = limite Then
Timer1.Stop
Timer2.Stop
Else
y += 1
ProgressBar2.Value += 0.1
cuentatotal += 1
'Print "Timer1 = " & x, "Timer2 = " & y
If y Mod 10 = 0 Then
y = 0
Timer1.Start
Timer2.Stop
Else
Timer1.Stop
Endif
Endif
End
Private x As Integer
Private y As Integer
Private cuentatotal As Integer
Const limite As Integer = 30
Public Sub Form_Open()
ProgressBar1.Value = 0
ProgressBar2.Value = 0
Timer1.Delay = 400
Timer2.Delay = 400
Timer1.Start
End
Public Sub Timer1_Timer()
x += 1
ProgressBar1.Value += 10 / limite
Timer1.stop
Timer2.Start
ProgressBar2.Value = 0
End
Public Sub Timer2_Timer()
If cuentatotal = limite Then
Timer1.Stop
Timer2.Stop
Else
y += 1
ProgressBar2.Value += 0.1
cuentatotal += 1
'Print "Timer1 = " & x, "Timer2 = " & y
If y Mod 10 = 0 Then
y = 0
Timer1.Start
Timer2.Stop
Else
Timer1.Stop
Endif
Endif
End
Ahora debe funcionar mejor.
Saludos
DosTimers.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | DosTimers.tar.gz | |
Tamaño: | 12.26 KB | |
Descargado: | 43 veces |
DosTimers.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | DosTimers.tar.gz | |
Tamaño: | 12.26 KB | |
Descargado: | 43 veces |
DosTimers.tar.gz | ||
Descripción: | Descargar |
|
Nombre del archivo: | DosTimers.tar.gz | |
Tamaño: | 12.26 KB | |
Descargado: | 43 veces |