>Instead of dropping Timers on forms, consider procedural code to define and instantiate a timer. Further, consider a Queue of timed activities whose members have as properties
>
>1) interval in milliseconds
>
>2) action to be taken ( including object reference where that method / procedure lives)
>
>3) sum of interval values that have elapsed since action last ran
>
>* Add methods to your procedural timer class for
> - adding to the queue ( disable timer while doing this )
> - removing from the queue ( disable timer while doing this )
> - checking to see if an entry already exists in the queue.
>
>* Maintain the queue in ascending interval order. (actual timer interval is the value of the first or minimum timer queue element's interval )
>
>* Update the sums of interval values in the queue.
>
>* execute all actions ( methods / procedures ) whose sum of intervals > or = to the interval for the action, and whose oject reference is still available
>
>* Reset sum for all actions taken.
>
>* Release timer on shut down
>
>Works for me.
>
>This does not depend upon a form
Heya Robin -
mine doesn't depend on a form either -
its an application level object.
Mondo Cool Explanation ! [Bill]
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only