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

    different interval?

    I have a timer control and it's interval = 0.9. Then i have another timer control it's interval = 9.5. When the second timer times out, It's supposed to unload the form. The problem is when i test out the program, it automatically unloads the form. both timer's intervals were 0.9. But 1 was supposed to be 9.5. Help!!!!!!!!!!!

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

  2. #2
    Join Date
    Jul 1999
    Posts
    84

    Re: different interval?

    Hello,

    Try setting the interval of the second timer on Form_load

    Thanks
    Harini

  3. #3
    Join Date
    May 2001
    Posts
    155

    Re: different interval?

    i set both of them in the form load


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

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: limit on milliseconds

    a timer can be set from 55 ms on (til about 60000)
    If you set it under 55, it will be as you have not done under.
    a difference of 0.5 or 5 millisecond is not perceptible by you. You can see (if you are fast) differences of about 20- 50 ms

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Jul 1999
    Posts
    84

    Re: different interval?

    Try increasing the time interval with a noticable amount of difference between the two timers.

    If this works out, it means the code is working out for your present time intervals also.

    Thanks
    Harini

  6. #6
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: different interval?

    Didn't I warn you about your use of timers in

    http://codeguru.com/cgi-bin/bbs/wt/s...b&Number=53340


  7. #7
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: You did

    You did, I do remember. Maybe there's another "memory leack" matter around here...


    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  8. #8
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: different interval?

    Remember that the interval property is measued in thousandths of a second.
    If you want your timer to trigger after .9 seconds, set this value to 900 - for 9 and a half seconds, set this value to 9500.

    HTH,
    D.

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

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