Results 1 to 4 of 4

Thread: Showing a clock

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    35

    Showing a clock

    TimeOfDay gives me the time when the from is open first time but it does not update it later.

    I like to have a clock that will show me the current time (9:36:53 PM - format) in a text box. How to do that?

  2. #2
    Addicted Member
    Join Date
    Apr 2004
    Location
    Lagos, Nigeria
    Posts
    215
    User a Timer. Update the Textbox with the Tick event of the timer.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    ex

    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.  
    3.         Timer1.Interval = 100
    4.         Timer1.Enabled = True
    5.  
    6.  
    7.  
    8.     End Sub
    9.  
    10.  
    11.  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    12.         Label1.Text = FormatDateTime(Now, DateFormat.LongTime)
    13.  
    14.  
    15.  
    16.     End Sub

  4. #4
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    The sandpaper lib has a real-time analog clock. Tres chic.

Posting Permissions

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



Click Here to Expand Forum to Full Width