Results 1 to 3 of 3

Thread: timer tick count...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    200

    timer tick count...

    I am using (in VB6) the Timer1 function to read data in at 10 seconds interval. How do I continue to display the seconds in a text box before the 10 seconds interval is reached? Example:

    1,2,3,4,5,6,7,8,9,10 --> collects data
    11,12,13,14,15,16,17,18,19,20 --> collects data
    21,22,23,24,25,26,27,28,29,30 --> collects data

    and so on...

    thanks.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: timer tick count...

    A few ways here are two.
    1. Use a counter and set your timer interval to 1 second. Display your seconds & increment counter. When the counter hits 10, reset it and collect your data.
    2. Use a 2nd timer

    Note that if your data collection takes more than a second, the timer(s) may not update your seconds display as desired. Timers are very low priority and are generally called when no other actions in your program are pending.
    Last edited by LaVolpe; Aug 12th, 2010 at 08:34 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    200

    Re: timer tick count...

    Hi. I just added another timer. so far so good. Thanks for your help.

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