Answered by:
Timers

Question
-
Is there a way that I can create a timer that will count either up or down if a checkbox is checked or unchecked?
Also, how to I make a countdown timer?
Edit:
Ill try to be more specific about what I want to do... I am making a game, and I want the user to have the ability to play timed. I want to have a set time limit to complete each level where the user has to get the mouse to a specific label in a set number of seconds, or I want the user to be able to have a timer count up so they can see how long it took to complete the level. I want to be able to display each timer's time left/elapsed in a labels Label.Text property. Please help!
- Edited by AndrewSchim Monday, May 21, 2012 5:53 AM
Monday, May 21, 2012 1:49 AM
Answers
-
Hi Andrew
You just do a increase logic for the up function and do descrease logic for down function in the Timer_Tick event.
and the increasing or desceasing step is the Timer.Interval property.
have a nice day.
DON'T TRY SO HARD,THE BEST THINGS COME WHEN YOU LEAST EXPECT THEM TO.
- Edited by Matthew LEAN . D Monday, May 21, 2012 2:23 AM
- Proposed as answer by Cor Ligthert Monday, May 21, 2012 6:26 AM
- Marked as answer by Bob Shen Monday, June 4, 2012 3:11 AM
Monday, May 21, 2012 2:21 AM -
Hi,
I guess Timer cannot be used as a counter (move Up and Down) Timer takes Environment.TickCount as base line and on interval it fires the event.
Are you looking to implement Counter? you can have a local variable with increament on up clicked and decreament on down clicked right?
If you give your requirement we will able to help you..
Please look for countdown timer : StopWatch
If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
Monday, May 21, 2012 2:41 AM
All replies
-
Hi Andrew
You just do a increase logic for the up function and do descrease logic for down function in the Timer_Tick event.
and the increasing or desceasing step is the Timer.Interval property.
have a nice day.
DON'T TRY SO HARD,THE BEST THINGS COME WHEN YOU LEAST EXPECT THEM TO.
- Edited by Matthew LEAN . D Monday, May 21, 2012 2:23 AM
- Proposed as answer by Cor Ligthert Monday, May 21, 2012 6:26 AM
- Marked as answer by Bob Shen Monday, June 4, 2012 3:11 AM
Monday, May 21, 2012 2:21 AM -
Hi,
I guess Timer cannot be used as a counter (move Up and Down) Timer takes Environment.TickCount as base line and on interval it fires the event.
Are you looking to implement Counter? you can have a local variable with increament on up clicked and decreament on down clicked right?
If you give your requirement we will able to help you..
Please look for countdown timer : StopWatch
If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
Monday, May 21, 2012 2:41 AM