I needing a program increase/decrease a day every 5 second or 1 min for clock system

I use date function to set day but I so weak in timer function :) and 1 loop fuction to when it to day 30 it will return 1
thk:)

Recommended Answers

All 3 Replies

I think you want to increase day in your program only..For this just use your timer control.First set the interval property to 5 [5000 in timer = 5 seconds ] seconds or 1 min.Then use a label or something to display the time and day.
Declare an integer then add it in timer and then set label1.caption = that declared integer.
Here i set a timer and a label named lbl1 and used this code

Dim a As Integer
Dim b As Integer
Dim c As Integer
Private Sub Timer1_Timer()
If a = 60 Then
a = 0
    If b = 24 Then
    b = 0
    c = c + 1
    Else
    b = b + 1
    End If
Else
a = a + 1
End If
lbl1.Caption = a & " -Min: " & b & " -Hrs " & c & " -Day "
End Sub

Try it ...
I think this will help you ...

If you want to do anything by using the day you set then just call the "c".It will store the day in c.And you can use to compare , or do some other coding..
Best wishes...

thk this i know how to use timer My program change day window system

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.