Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • THEAF
    New Member
    • Mar 2007
    • 52

    #1

    Time

    other than using a label with timer is there any other way to show the actual time.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by THEAF
    other than using a label with timer is there any other way to show the actual time.
    yeap, you can put it anywhere you want, in a msgbox(time) or

    textbox1.text=t ime
    msgbox (time)
    form1.caption = time
    label1.caption= time
    listbox1.addite m(time)

    or you can do something like this with a toggle button and a textbox

    [CODE=vb]Private Sub ToggleButton1_C lick()
    Dim StartTime
    TextBox1.Text = Time
    StartTime = Timer
    Do
    If ToggleButton1.V alue = True Then
    ToggleButton1.C aption = "Clock Activated"
    Do While Timer < StartTime + 1
    DoEvents
    Loop
    TextBox1.Text = Time
    StartTime = Timer
    Else
    ToggleButton1.C aption = "Activate Clock"
    Exit Do
    End If
    Loop
    End Sub[/CODE]

    Hope that answers your question.

    Kad

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      One nice way is to place it in a status bar. There is a StatusBar control and when you set it up, you can set panels on it to display current date or time, as well as your own custom content.

      Comment

      Working...