Monday, 18 June 2012

Digital clock in vb.net?


Digital clock
To make this clock
You just need:
à9 labels
àTimer =999, enabled is true
Copy and paste code below



Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Close()

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        Try

            Label1.Text = Now.Hour
            Label2.Text = Now.Minute
            Label3.Text = Now.Second
            Label4.Text = Now.Hour + "01"
            Label5.Text = Now.Minute + "01"
            Label6.Text = Now.Second + "01"
            Label7.Text = Now.Hour - "01"
            Label8.Text = Now.Minute - "01"
            Label9.Text = Now.Second - "01"



        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString)
        End Try
    End Sub

    a
End Class


No comments:

Post a Comment