0

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:)

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by phuanon
1

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 ...

1

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...

Edited by Vineeth K: There is an error in my netconnection , this post is just duplicated.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.