Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am making a program at the moment and the last thing to do is make a coutdown time from 2 hours example 2:00:00 1:59:59 ect and stop when it gets to 0 and this needs to continue at the same time in each of the Diffrent Windows I am using Visual Basic 2008 Express Edition would anyone know the code to use and how i could do this many thanks BJseal91

'i can't write the whole shebang (designing the windows,
'setting label captions etc.). this snippet just does the
'timer stuff. There are numerous ways to do this, but
'here's one way to do it:
dim dd as Date
dd="02:00:00"
timr:
sleep 1000
dateadd("s",-1,dd)
dd=left(Cstr(dd),8)
if dd="12:00:00" then dd="00:00:00"
window1.label1.caption=dd
window2.label1.caption=dd
window3.label1.caption=dd... dah dah dah for all windows
if dd<>"00:00:00" then goto timr

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |