Jump to content

Recommended Posts

Posted

pessoal eu queria quando o timr fosse 00:00:10 o contador volta-se a 0:00:00 e tivesse sempre nisto(um ciclo)

tenho o código assim:

Dim X As Variant
Dim C As Variant
Dim B As Date
Dim Y As Date

Private Sub Timer2_Timer()
Y = Time - X
Label6.Caption = Y
Label4.Caption = Y

pronto isto começa do zero quando carregamos o programa(no load da form) eu queria quando fosse aos 10 segundos começa de novo como fazaer?

Posted

Para pores o tempo correr de 10 em 10 segundo basta fazeres isto:

Private Sub Command1_Click()

End

End Sub

Private Sub Command2_Click()

Label1.Caption = 10

End Sub

Private Sub Timer1_Timer()

If Label1 <> "0" Then

  Label1.Caption = Label1 - 1

End If

End Sub

Nota o intervalo do timer tem que ser 1000

Lema: Se eu não saber de alguma coisa não se preocupem porque tento sempre ajudar alguma coisita, nem que seja, por palpites/sugestões.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.