CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Posts
    155

    Timer interval change constantly

    I have a label and a timer. The timer interval is set to .9. When the person clicks a button the timer is supposed to increase the label by 1, then after 3 seconds it slows down a little bit, then a little bit more etc. until the label stops going up completely. how would i do that?

    --Ant
    --------------------------------------------------
    check out my newest freeware
    E-mail me at: [email protected]
    for the address

  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Timer interval change constantly

    Let's say you start with the interval X (gotta love algebra...).
    When the interval occurs, add a percentage of X to itself to increase the interval. As the interval increases, the amount added increases.

    X = X + (.01)(X) 'Add 1% of X to itself
    Timer1.Interval = X



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured