Sorry - my knowledge of VB.Net isn't quite up to scratch to interpret what
you are saying about the 'key' to the timer.
The actual problem is that I have a number of IP based door swipes (access
control). When someone swipes a card, my program receives the card details
and processes it and opens the door (or not). It also creates a component
which receives and records an MPEG4 stream from a video source. That is all
working OK.
I also create a timer and set it to a value which is based on the length of
time that I want the video to be recorded of the person who swiped the card.
When the timer fires, it has to turn off the video stream from that
particular camera. The dynamic part is that I have no idea how many people
are likely to be swiping their cards at the same time, so I need to create
and destroy timers at will. On large installations this could be more than
20 (eg. in a college at home time). When the timer fires it will end up at a
common point, so I need to be able to identify it so that I know which video
stream to cut off.
- Jerry
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
"Jerry Spence1" <je**********@somewhere.com> schrieb Thanks Armin
If it's reference is stored outside all Subs, then how can I create
it dynamically?
You can add them to an array list.
What I don't understand: If the number of Timers is not known at design
time, the reference is already the "key" to the timer. The 'sender' is
already pointing to the timer that fired the event. Why do you need
another
way of identification? I would probably understand it if the number of
Timers was determined at design time. Then you could write code
distinguishing between Timers A, B and C, but as you want to add Timers
dynamically, this is obviously not the case. So, what's your intention?
Armin