+ Reply to Thread
Results 1 to 2 of 2

Thread: Creating a Clock

  1. #1
    AfTriX is offline Programming God
    Join Date
    Jan 2007
    Location
    Chicago
    Posts
    586
    Rep Power
    0

    Creating a Clock

    Start of by creating a standard .exe project

    now make one label and one timer

    name them:
    label: lblTime
    timer: tmrTimer

    now add

    Option Explicit

    to the code

    now we need to use the form_load event to start the clock:
    we do this by first adding the code:

    Private Sub Form_Load()

    End Sub

    to the code and now we add the line lblTime.Caption = Time between them to sett the label to the local system time
    but we also need to sett the interval of the timer
    do this by adding the code:

    tmrTimer.Interval = 1000
    on the next line (still inside the form_load event)

    now we need to ad a update event
    add the code:

    Private Sub tmrTimer_Timer()

    End Sub

    outside of the form_load event
    now we can add code that will be executed then each time the timer reaches 0

    add the code:

    lblTime.Caption = Time
    inside the tmrTimer_Timer event

    now you got a basic digital clock

    hope this sums it up
    happy coding!!!



    Ref:
    Photoshop Tutorials and Flash Tutorials

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    VBnet's Avatar
    VBnet is offline Newbie
    Join Date
    May 2009
    Location
    Sweden :D
    Posts
    18
    Rep Power
    11

    Re: Creating a Clock

    dont forget to add codes in my taco

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Clock In/Out System
    By BlaineSch in forum PHP Tutorials
    Replies: 4
    Last Post: 11-08-2011, 09:32 AM
  2. countdown clock
    By Orjan in forum JavaScript and CSS
    Replies: 4
    Last Post: 04-20-2010, 05:06 PM
  3. Code: LCD Clock
    By TcM in forum Visual Basic Tutorials
    Replies: 25
    Last Post: 08-03-2009, 09:36 AM
  4. Clock
    By Shaddix in forum Java Help
    Replies: 3
    Last Post: 04-26-2009, 07:19 AM
  5. Creating an analog clock with ActionScript
    By AfTriX in forum Tutorials
    Replies: 2
    Last Post: 01-07-2007, 12:19 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts