locked
Timers RRS feed

  • 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!

    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.



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


    • Edited by Kris444 Monday, May 21, 2012 2:42 AM
    • Marked as answer by Bob Shen Monday, June 4, 2012 3:11 AM
    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.



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


    • Edited by Kris444 Monday, May 21, 2012 2:42 AM
    • Marked as answer by Bob Shen Monday, June 4, 2012 3:11 AM
    Monday, May 21, 2012 2:41 AM