CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 1998
    Posts
    3

    Advanced Timer progamming without DoEvents?



    Hi VB-Enthusiasts!!!


    I started to use Visual Basics timer control and am amazed how limited this object still is regarding having VB in its 6th version by now. Please convince me of the opposite ;-)


    Well, I struggle with the following situation...


    I'd like to display an animated icon in the taskbar while their is a 1-minute process going on.


    The animation is handled within my Timer-Routine and changes the picture of the taskbar-Icon regularly - this works fine so far.


    As soon as I call the process (I call a method in a referenced object), the timer is not called anymore, which means the Animation stays still until the process of that method gives the control back. Too bad!!!


    The problem is, that I can't use "DoEvents" because of the external object routine. It wouldn't allow smooth timer animation anyway.


    Now, I can't believe, that Visual Basic doesn't support 'propper' Multitasking Timer support which is independent from other tasks running. Am I wrong? Do I have to use Windows-API to solve that? How do Game-Programmers and/or Multimedia-Experts set up a 'real' Timer?


    Thanks for any suggestions.


    Roman Werner

  2. #2
    Join Date
    Oct 1998
    Posts
    3

    Re: Advanced Timer progamming without DoEvents?



    How do I use the multimedia timer? Any Examples?


    The link to the subject "Create a Windows multimedia timer" to be found on this site is unfurtunately broken ;-(


    Regards,

    Roman Werner




  3. #3
    Join Date
    May 1999
    Posts
    10

    Re: Advanced Timer progamming without DoEvents?



    You should read the multimedia timer section on this website. There this topic is discussed in detail.


    Felix

  4. #4
    Join Date
    Oct 1998
    Posts
    3

    Re: Advanced Timer progamming without DoEvents?



    I finally found the article about the Multimedia Timer:


    http://www.codeguru.com/vb/links/jump.cgi?ID=13 (Well hidden!?)


    Thanks a lot for leading me into the right direction


    Regards,

    Roman Werner

  5. #5
    Join Date
    Oct 1998
    Posts
    6

    Re: Advanced Timer progamming without DoEvents?



    Can't you put the animation on a worker thread. I reckon you would have to use the API for that ... I don't think there are any VB functions to handle threads.


    Gordito

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