| | |
timer starts from 00:00:00
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2006
Posts: 2
Reputation:
Solved Threads: 0
hey.. again i wud like to ask for ur help..
im a really newbie to vb6 n a really stupid one..
so.. my teacher want me to test the time on how long does da program save the file to database..
so i have to put timer.. on save capture form,
it has to start from 00:00:00:00 (hr:min:seconds:millisnds) or just min:seconds:millis
so when i click save command button it starts counting and if the file has been saved on da database da timer stops counting, n i can see how long does it takes to save a file to database.. on a label..
i found some articles(on here).. but cant seem to edit it the way i want.. (im sorry for da stupidness)
here is one article i found
http://www.daniweb.com/techtalkforums/thread17352.html
most of it are countdowns and print current time, what i need is start from zero.. 00:00:00:00
can anyone help me?im not good in editing code or anything..
i mean really help me, like in dat forum.. helping me with the code..
thanks aaaaaaaaaaaa lottttttttt
help me..
im a really newbie to vb6 n a really stupid one..
so.. my teacher want me to test the time on how long does da program save the file to database..
so i have to put timer.. on save capture form,
it has to start from 00:00:00:00 (hr:min:seconds:millisnds) or just min:seconds:millis
so when i click save command button it starts counting and if the file has been saved on da database da timer stops counting, n i can see how long does it takes to save a file to database.. on a label..
i found some articles(on here).. but cant seem to edit it the way i want.. (im sorry for da stupidness)
here is one article i found
http://www.daniweb.com/techtalkforums/thread17352.html
most of it are countdowns and print current time, what i need is start from zero.. 00:00:00:00
can anyone help me?im not good in editing code or anything..
i mean really help me, like in dat forum.. helping me with the code..
thanks aaaaaaaaaaaa lottttttttt
help me..
•
•
Join Date: Jan 2006
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by beuls
or try this in vb.net
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = Convert.ToString(DateTime.Now.Hour) + ":" + Convert.ToString(DateTime.Now.Minute) + ":" + Convert.ToString(DateTime.Now.Second)
End Sub
i duno how .net works..
•
•
Join Date: Jan 2006
Posts: 40
Reputation:
Solved Threads: 2
try this code pls
Adjust the intervals of timers as per ur wish
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Dim hr%, m%, s% Private Sub Form_Load() hr = 0 m = 0 s = 0 End Sub Private Sub hour_Timer() hr = hr + 1 End Sub Private Sub min_Timer() m = m + 1 End Sub Private Sub sec_Timer() s = s + 1 Label1.ForeColor = RGB(hr, m, s) Label1.Caption = hr & ":" & m & ":" & s End Sub
Adjust the intervals of timers as per ur wish
![]() |
Similar Threads
- Visual Basic Timer/Clock/Countdown. (Visual Basic 4 / 5 / 6)
- Timer Count Down and stop (VB.NET)
- Code run when form shown ? (C#)
- Help With A Timer And Stopping It. (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: connection to a remote database
- Next Thread: Is anyone up to a challenge?
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





