Métodos
Propiedad Interval Establece un intervalo expresado en milisegundos.
Propiedad Enable Comienza o termina a transcurrir el temporizador.
Eventos
Tick Se produce cuando se cumple el intervalo de tiempo establecido en la propiedad Interval.
Reloj Digital
Arrastrar del cuadro de herramientas los controles Label y Timer al Form. Renombrar Label1 a relojLb y Timer1 a relojTm. Cambiar las propiedades Interval a 1000 y Enable a True.
Public Class MainForm
Private Sub relojTm_Tick(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles relojTm.Tick
relojLb.Text = FormatDateTime(Date.Now, DateFormat.LongTime)
End Sub
End Class
No hay comentarios:
Publicar un comentario