Click to See Complete Forum and Search --> : Advanced Timer progamming without DoEvents?


Roman Werner
October 21st, 1998, 04:55 AM
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

Roman Werner
October 22nd, 1998, 03:05 AM
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

Felix
October 22nd, 1998, 03:50 AM
You should read the multimedia timer section on this website. There this topic is discussed in detail.


Felix

Roman Werner
October 22nd, 1998, 05:17 AM
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

Gorditos
October 29th, 1998, 06:37 AM
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