NI Home > Community > NI Discussion Forums
Reply
Member
SnowForest
Posts: 112
0 Kudos
Accepted Solution

How to get Value change event from ActiveX component?

Hi All,

 

LV 8.6.1

 

I try to get value change event from ActiveX component. I have browsed forum and examples through but I can't get an idea how to use "callback  vi". E.g. in example "ActiveX Event Callback for IE.vi" there is used "callback vi". I added an example where value change event and mouse down event are programmed to event structure. Mouse down event work okay but value change not. Can someone describe what I must add to my example vi that value change event works okay?

 

BR, Jim

Active Participant
Julien_2831
Posts: 389

Re : How to get Value change event from ActiveX component?

Here's the solution ! "Value change event" is not performed into event structure but into "Callback VI".
Member
SnowForest
Posts: 112
0 Kudos

Re: Re : How to get Value change event from ActiveX component?

Hi, Krsone

 

Thank you very much. Your example works perfect. I forget to mention that I need this event also to event structure. My code structure is producer-consumer and this value change event should be passed also to queue. Should I add variable to "callback vi" or is there any easier way ?

 

BR, Jim

Trusted Enthusiast
Norbert_B
Posts: 4,293

Re: Re : How to get Value change event from ActiveX component?

Jim,

 

in order to synchronize ActiveX callbacks with the producer/cosnumer, you have to either

- create an user event in the callback and capture this in you producer  or

- obtain the queue between producer and consumer in your callback and insert the appropriate element into the queue in the callback.

 

I think the second option is easier to implement but is more limited in its functionality.

 

hope this helps,

Norbert 

----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Active Participant
LabBEAN
Posts: 371
0 Kudos

Re: Re : How to get Value change event from ActiveX component?

I modified the VIs for an upcoming User Group.  As Norbert B mentioned, I used user events to signal back to the main code that we got the DTPicker change event.
Active Participant
LabBEAN
Posts: 371
0 Kudos

Re: Re : How to get Value change event from ActiveX component?

Norbert-

 

14 posts to go... Congratulations in advanced (pre-enthusiast)!