Visual Basic - Ayuda con Cronometro

Life is soft - evento anual de software empresarial
 
Vista:

Ayuda con Cronometro

Publicado por Marcos (8 intervenciones) el 31/05/2006 15:28:29
Hola Gente,
Estoy teniendo problemas al colocar un cronometro en un form, la idea es que arranque el form, y cuando se haga click en un boton se active un cronometro, y que frene el cronometro cuando se haya terminado de ejecutar todo el codigo de ese Boton.
Les dejo el codigo, para ver si me pueden decir como puedo poner un cronometro POR FAVOR !!

Private Sub Command1_Click()
Dim Consultor as string

***ACA NECESITO QUE ARRANQUE EL TIMER PARA CONTAR EN SEGUNDOS***

If Dir("C:\Recursos.txt") <> "" Then
Open "C:\Recursos.txt" For Input As #1

While Not EOF(1)
Line Input #1, file_data$
consultor = Trim(Mid(file_data$, 1, 5))
Wend

Close #1

Else
MsgBox "El archivo no existe"
End If

**ACA NECESITO QUE SE DETENGA EL TIMER Y MUESTRE EL VALOR FINAL***

End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:Ayuda con Cronometro

Publicado por christian rodriguez (54 intervenciones) el 01/06/2006 03:56:27
NO LO PROBE, PERO ES UNA IDEA

Private Sub Command1_Click()
Dim Consultor as string

***ACA NECESITO QUE ARRANQUE EL TIMER PARA CONTAR EN SEGUNDOS***

timer1.enabled = true
do events

If Dir("C:\Recursos.txt") <> "" Then
Open "C:\Recursos.txt" For Input As #1

While Not EOF(1)
do events
Line Input #1, file_data$
consultor = Trim(Mid(file_data$, 1, 5))
Wend

Close #1

Else
MsgBox "El archivo no existe"
End If

**ACA NECESITO QUE SE DETENGA EL TIMER Y MUESTRE EL VALOR FINAL***

timer1.enabled = false
do events

End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar