CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Timer

  1. #1
    Join Date
    Oct 1999
    Posts
    21

    Timer

    I want to run my Vb application every half an hour. I cannot use the timer control as timer interval is in milliseconds and the maximum time you can give is some 65535 milliseconds which is little over a minute.

    Can anybody tell me how to solve this problem?

    Thanks!


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Timer

    use a timer, set the interval to 1 minute.
    use a static variable in your timer event,
    increment it by one upon each timer event.
    if it is equal to 30, then 30 minutes have elapsed.
    Do your processing and set your variable to zero again.


  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Timer

    I Added an article on the CG site on Tuesday that shows how to create a new timer control that can accept intervals > 65535 - you just place it on your form and off you go :

    http://codeguru.developer.com/vb/articles/1938.shtml


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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