[VB] Temporizador

Iniciado por ProcessKill, Febrero 23, 2010, 04:05:06 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Febrero 23, 2010, 04:05:06 PM Ultima modificación: Julio 08, 2011, 09:23:44 AM por ANTRAX
Bueno, este code es bastante sencillo pero uitill

Para el Temporizador:

  • 1 boton
  • 3 TextBox
  • 1 Timer

    Código: vb
    Dim Minutos As Integer
    Dim Segundos As Integer
    Private Sub Command1_Click()
    Minutos = Text1.Text * 60
    Segundos = (Minutos + Text2.Text) * 60 + Text3.Text
    Timer1.Enabled = True
    End Sub


    Private Sub Form_Load()
    Timer1.Interval = 1000
    Timer1.Enabled = False
    End Sub

    Private Sub Timer1_Timer()
    Segundos = Segundos - 1
    If Segundos <= 0 Then
    Timer1.Enabled = False
    Call Pitido
    End If
    End Sub

    Private Function Pitido()
    Call MsgBox("TIEMPO", vbInformation, "TIEMPO")
    End Function