Looking for a vb guru


Thread Starter

Chris Elston

I am using an Acuity Visionscape Express Vision System board in an NT 4.0 SP6 box. I am not a VB guru by no means, but here is what I am trying to do.

The Vision board comes with some standard Active X controls which are pretty slick. One of the calls is I can read and write to a "virtual I/O" point. I'd like to monitor an OUTPUT from one of these virtual I/O points to trigger an event in my own VB code.

Trouble is, since VB is event driven, the virtual I/O point on the vision board is not driven by a user, but rather the board itself.

So my question is, is there an VB events or controls I can use that can monitor another Active X control for change of state?

Here was my two thoughts:

1. Make an event triggered timer, this would act as a "heartbeat" I assume. After each timer expire, run the subroutine to "read" what the state of the virtual I/O point is on the vision board. This would work, but I'd rather trigger an event on change of state from the virutal I/O point.

2. Somehow read the virtual I/O point in "realtime" to a lblMyVirtualPoint.Caption. Then use the event On_Change to trigger my change of state subrountine.

Any thoughts or suggestion? Or pointers in the direction along the lines of some control or active x component I can use to monitor or do some "realtime" monitoring?


Tom Connolly

It seems that the Active X controls you are using should have their own notification events. You can possibly use subclassing techniques to intercept messages and in turn, fire off your own vb events if necessary. Give me some more information about these controls you are using and maybe we can come up with something.

[email protected]
I also think that a Timer reading the virtual I/O or somehow intercepting the message of change of the ActiveX control's virtual I/O:s is the only way (don't know how this intercepting would work though).

I can't see any other way... if the ActiveX control doesn't have a 'on virtual I/O change' event that could be triggered.

Anyway... about intercepting a message for the ActiveX control... are you sure that there is a message when the state changes? I mean - couldn't it just be that there's only a method for reading the status and that it would be your only option then to continuouslly read the status?