954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

timer in VB6

hey y'all

i just started messing with VB about 3 days ago

i just created a countdown timer.
it works as far as result goes
but here's my prob.
i created a command button, when i click on it, it shows me the correct countdown and all

how can i keep the app runnin and the screen refreshing every
second on its own.

i want it to constantly update itself in 1 sec increments without me doing anything


any help?? thanks

newb666
Newbie Poster
2 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

Hi ,

Take a look at this app. It might be helpful to you.

Attachments timer.zip (6.36KB)
Marikanna
Light Poster
32 posts since Aug 2005
Reputation Points: 16
Solved Threads: 1
 

wow, thank you very much!!!!!

newb666
Newbie Poster
2 posts since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

Hi ,

Take a look at this app. It might be helpful to you.

thanks for the info... i used your timer in one of the system i created, at first it was ok, but when i turn my system, the timer seems creating a delay... it stops for a while for a reason i dont know. please help me with this... thanks a lot

bdict
Newbie Poster
2 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

call the procedure timer1_timer under form_load event.

choudhuryshouvi
Posting Pro
553 posts since May 2007
Reputation Points: 30
Solved Threads: 49
 

thank you so much....it helps a lot...

bdict
Newbie Poster
2 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

how about an actual time?

jantzen16
Newbie Poster
1 post since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

To use actual time; you need to use a timer with 1000 millisecond interval, if we use the variables THour, TMinute, TSecond for Alarm time then the code will be:

Private Sub Timer1_Timer()
If Hour(Time) = THour AND Minute(Time) = TMinute AND Second(Time) = TSecond THEN 
Msgbox "Alarm!" 'or whatever you want to do 
End IF
Drycola
Junior Poster in Training
74 posts since Aug 2008
Reputation Points: 20
Solved Threads: 9
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You