Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2011, 12:42
manuysussemillas
 
Fecha de Ingreso: marzo-2011
Mensajes: 10
Antigüedad: 13 años, 2 meses
Puntos: 0
Reloj con hora del sistema en VB

Hola coleguis aquí os dejo el código para insertar la hora del sistema, tan sólo necesitais un textbox y un timer, ya me contais.

Option Explicit

Dim tiempo As String


Private Sub Form_Load()

Timer1.Interval = (Hour(Now))
Text1.Text = ""


End Sub



Private Sub Timer1_Timer()

tiempo = Format(Int(Hour(Now)) Mod 24, "00") & ":" & _
Format(Int(Minute(Now)) Mod 60, "00") & ":" & _
Format(Int(Second(Now)) Mod 60, "00")


Text1.Text = tiempo


End Sub