Red de conocimientos turísticos - Información de alquiler - Utilice vb para diseñar el código del programa de cuenta regresiva
Utilice vb para diseñar el código del programa de cuenta regresiva
Subcomando privado1_Click()
Label1.Caption = Text1.Text
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub text1_KeyPress(KeyAscii As Integer) 'el texto solo puede ingresar número
Seleccione caso KeyAscii
Caso 48 a 57 '0-9
Salir sub
Caso más
KeyAscii = 0
Fin de selección
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Str(Val( Label1 .Caption) - 1)
Si Val(Label1.Caption) = 0 Entonces
MsgBox "Se acabó el tiempo"
Timer1.Enabled = False p>
p>
Finalizar si
Finalizar sub