Sign in to follow this  
AoLin

Simple horloge.

5 posts in this topic

Bonsoir à tous

 

On peut faire un peut plus compliqué mais tout aussi bien

avec

un Label avec comme Police Digital 7 google est votre ami :) en vert sur fond noir :)

et 1 timer

 

dans le code du timer

>
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
       Dim minute As String = Date.Now.Minute
       Dim second As String = Date.Now.Second

       If second < 10 And second >= 0 Then
           second = 0 & second

       End If
       If minute < 10 And minute >= 0 Then
           minute = 0 & minute
       End If
       Label1.Text = Date.Now.Hour & " :  " & Date.Now.Minute & " : " & second

ce code a normalement pour but de corrigé l'erreur de l'affichage , normalement il manque le 0 avant "minute" exemple 21 : 1 : 2 en 21:01:02

 

Voila Cordialement

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this