Advertisement
Shell01

Ejemplo de temporizador

Jul 11th, 2022
2,274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.37 KB | None | 0 0
  1. Private inicio As Date
  2.  
  3. Public Sub Form_Open()
  4.  
  5.   Me.Caption = "TEMPORIZADOR"
  6.  
  7. End
  8.  
  9. Public Sub Timer1_Timer()
  10.  
  11.   Dim tiempo As Date
  12.  
  13.   tiempo = Time - inicio
  14.   lblreloj.Text = Format$(tiempo, "hh:nn:ss")
  15.  
  16. End
  17.  
  18. Public Sub cmdIniciar_Click()
  19.  
  20.   inicio = Time
  21.   Timer1.Start
  22.  
  23. End
  24.  
  25. Public Sub cmdDetener_Click()
  26.  
  27.   Timer1.Stop
  28.  
  29. End
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement