E
elziko
I have an object (Object1) that instantiates another class (Object2) in a
seperate thread. It must be in its own thread for an ActiveX control it
hosts to work.
From Object1 I can get to all the methods of the ActiveX control in Object2
which is fine. However, I need to get some information back from Object2 as
its state changes. How would I go about informing Object1 of events that
occur in the ActiveX control?
At the moment I'm rtying a workaround where I use a System.Timers.Timer to
periodically check the properties of the ActiveX control I'm interested in.
However the timer mechanism seems to be very unreliable. Sometimes the
'Elapsed event' doesnt occur at all, and sometimes it seems to occur in
quick succession before the code inside the 'Elapsed' event has finished
executing.
Help on either of these matters would be great but I think the first idea
will be better since as this project grows I may have to check too many
events in the timer.
seperate thread. It must be in its own thread for an ActiveX control it
hosts to work.
From Object1 I can get to all the methods of the ActiveX control in Object2
which is fine. However, I need to get some information back from Object2 as
its state changes. How would I go about informing Object1 of events that
occur in the ActiveX control?
At the moment I'm rtying a workaround where I use a System.Timers.Timer to
periodically check the properties of the ActiveX control I'm interested in.
However the timer mechanism seems to be very unreliable. Sometimes the
'Elapsed event' doesnt occur at all, and sometimes it seems to occur in
quick succession before the code inside the 'Elapsed' event has finished
executing.
Help on either of these matters would be great but I think the first idea
will be better since as this project grows I may have to check too many
events in the timer.